From 7926ee1c7a755bc1710519bddde4ef0141bb9af0 Mon Sep 17 00:00:00 2001 From: Alex Michaud Date: Tue, 20 Mar 2012 14:14:37 -0700 Subject: [PATCH] Fixed bug with JSON decodes not returning errors --- AFNetworking/AFJSONUtilities.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AFNetworking/AFJSONUtilities.m b/AFNetworking/AFJSONUtilities.m index b7bb02f..6dc2b5d 100644 --- a/AFNetworking/AFJSONUtilities.m +++ b/AFNetworking/AFJSONUtilities.m @@ -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]; @@ -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]; @@ -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]; @@ -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];