]> granicus.if.org Git - json-c/commitdiff
Fix json_object_get_boolean to return false for empty string
authorMichael Clark <michael@metaparadigm.com>
Mon, 27 Apr 2009 08:19:27 +0000 (08:19 +0000)
committerMichael Clark <michael@metaparadigm.com>
Mon, 27 Apr 2009 08:19:27 +0000 (08:19 +0000)
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

json_object.c

index 6c20579dc7998e05c2ef17648cc35538b5ffa8bc..e412e4f7dbf20006b7fd294ced316cf8d50f8234 100644 (file)
@@ -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;
   }
 }