Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Commit

Permalink
Fixed bug with JSON decodes not returning errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zole committed Mar 20, 2012
1 parent c198eaf commit 7926ee1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AFNetworking/AFJSONUtilities.m
Expand Up @@ -143,7 +143,7 @@ id AFJSONDecode(NSData *data, NSError **error) {
NSUInteger parseOptionFlags = 0;
[invocation setArgument:&parseOptionFlags atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
if (error != NULL) {
[invocation setArgument:error atIndex:3];
[invocation setArgument:&error atIndex:3];
}

[invocation invoke];
Expand All @@ -165,7 +165,7 @@ id AFJSONDecode(NSData *data, NSError **error) {
NSUInteger yajlParserOptions = 0;
[invocation setArgument:&yajlParserOptions atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
if (error != NULL) {
[invocation setArgument:error atIndex:3];
[invocation setArgument:&error atIndex:3];
}

[invocation invoke];
Expand All @@ -178,7 +178,7 @@ id AFJSONDecode(NSData *data, NSError **error) {

[invocation setArgument:&data atIndex:2]; // arguments 0 and 1 are self and _cmd respectively, automatically set by NSInvocation
if (error != NULL) {
[invocation setArgument:error atIndex:3];
[invocation setArgument:&error atIndex:3];
}
[invocation setArgument:&nullOption atIndex:4];

Expand All @@ -196,7 +196,7 @@ id AFJSONDecode(NSData *data, NSError **error) {
NSUInteger readOptions = 0;
[invocation setArgument:&readOptions atIndex:3];
if (error != NULL) {
[invocation setArgument:error atIndex:4];
[invocation setArgument:&error atIndex:4];
}

[invocation invoke];
Expand Down

0 comments on commit 7926ee1

Please sign in to comment.