* Fix additional error case in object parsing

* Add back sign reversal in nested object parse as error pointer
    value is negative, while error value is positive.
    Michael Clark <michael@metaparadigm.com>


git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@8 327403b1-1117-474d-bef2-5cb71233fd97
This commit is contained in:
Michael Clark
2007-03-13 08:26:22 +00:00
parent 7b899b6dc5
commit 0370baa74c
4 changed files with 17 additions and 5 deletions

View File

@@ -121,6 +121,9 @@ int main(int argc, char **argv)
printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj));
json_object_put(new_obj);
new_obj = json_tokener_parse("{ foo }");
if(is_error(new_obj)) printf("got error as expected\n");
new_obj = json_tokener_parse("foo");
if(is_error(new_obj)) printf("got error as expected\n");