Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5dd6259

Browse files
committed
Decrement depth just before checking
1 parent e3d7718 commit 5dd6259

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎src/generic/stage2/structural_parser.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ object_continue: {
171171
}
172172
case '}':
173173
builder.end_object(*this);
174-
depth--;
175174
goto scope_end;
176175
default:
177176
log_error("No comma between object fields");
@@ -180,6 +179,7 @@ object_continue: {
180179
} // object_continue:
181180

182181
scope_end: {
182+
depth--;
183183
if (depth == 0) { goto document_end; }
184184
if (dom_parser.is_array[depth]) { goto array_continue; }
185185
goto object_continue;
@@ -213,7 +213,6 @@ array_continue: {
213213
goto array_value;
214214
case ']':
215215
builder.end_array(*this);
216-
depth--;
217216
goto scope_end;
218217
default:
219218
log_error("Missing comma between array values");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /