Fix json_object_get_boolean to return false for empty string
Spotted by Vitaly Kruglikov, Vitaly dot Kruglikov at palm dot com git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@35 327403b1-1117-474d-bef2-5cb71233fd97
This commit is contained in:
1 parent
95f55a761c
commit
6f70e44b7d
1 file changed
+1
-1
+1
-1
@@ -309,7 +309,7 @@ boolean json_object_get_boolean(struct json_object *jso)
|
||||
case json_type_string:
|
||||
return (strlen(jso->o.c_string) != 0);
|
||||
default:
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user