Skip to content

Commit 7b602cd

Browse files
committed
Restore change lost in last commit
1 parent 292390e commit 7b602cd

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

Source/NSJSONSerialization.m

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@
336336
return currentChar(state);
337337
}
338338

339-
static void parseError(ParserState *state);
340339

341340
NS_RETURNS_RETAINED static inline id
342341
parseCollection(ParserState *state, id (*func)(ParserState*))
@@ -354,16 +353,14 @@
354353
if (state->depth >= 512)
355354
{
356355
NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:
357-
_(@"JSON Parse error"), NSLocalizedDescriptionKey,
358-
_(([NSString stringWithFormat: @"Recursion limit reached at index %"PRIdPTR,
359-
state->sourceIndex])),
360-
NSLocalizedFailureReasonErrorKey,
361-
nil];
362-
state->error = [NSError errorWithDomain: NSCocoaErrorDomain
363-
code: 0
364-
userInfo: userInfo];
365-
RELEASE(userInfo);
366-
parseError(state);
356+
_(@"JSON Parse error"), NSLocalizedDescriptionKey,
357+
_(([NSString stringWithFormat: @"Recursion limit reached at index %"PRIdPTR, state->sourceIndex])),
358+
NSLocalizedFailureReasonErrorKey,
359+
nil];
360+
state->error = [NSError errorWithDomain: NSCocoaErrorDomain
361+
code: 0
362+
userInfo: userInfo];
363+
RELEASE(userInfo);
367364
return nil;
368365
}
369366
state->depth++;

0 commit comments

Comments
 (0)