mirror of
https://github.com/json-c/json-c.git
synced 2026-03-25 07:59:07 +08:00
Fix a bug in json_object_get_int() where calling it on a string type object would always return 0, instead of the actual numerical value of the string.
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@66 327403b1-1117-474d-bef2-5cb71233fd97
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user