]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Fix a bug in json_object_get_int() where calling it on a string type object would...
authorEric Haszlakiewicz <ehaszla@transunion.com>
Tue, 3 May 2011 20:39:07 +0000 (20:39 +0000)
committerEric Haszlakiewicz <ehaszla@transunion.com>
Tue, 3 May 2011 20:39:07 +0000 (20:39 +0000)
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@66 327403b1-1117-474d-bef2-5cb71233fd97

json_object.c

index 8f1a67e574e628ca441c932a8f61265ce8052387..054657aaf58a0cd24f5996c08a5aea025544d587 100644 (file)
@@ -349,7 +349,7 @@ int32_t json_object_get_int(struct json_object *jso)
        o_type = json_type_int;
   }
 
-  switch(jso->o_type) {
+  switch(o_type) {
   case json_type_int:
        /* Make sure we return the correct values for out of range numbers. */
        if (cint64 <= INT32_MIN)