Skip to content

Commit 5a01839

Browse files
author
crystalwind
committed
Do tutorial01 exercise
1 parent 1635f79 commit 5a01839

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tutorial01/leptjson.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,9 @@ int lept_parse(lept_value* v, const char* json) {
6363
if (lept_parse_result == LEPT_PARSE_OK) {
6464
lept_parse_whitespace(&c);
6565
if (*c.json != '\0')
66-
return LEPT_PARSE_ROOT_NOT_SINGULAR;
67-
else
68-
return LEPT_PARSE_OK;
66+
lept_parse_result = LEPT_PARSE_ROOT_NOT_SINGULAR;
6967
}
70-
else
71-
return lept_parse_result;
68+
return lept_parse_result;
7269
}
7370

7471
lept_type lept_get_type(const lept_value* v) {

0 commit comments

Comments
 (0)