mirror of
https://github.com/json-c/json-c.git
synced 2026-03-29 09:59:06 +08:00
Issue #539: reset the serializer when json_object_set_double() is called and the current serializer is the one that json_object_new_double_s() used.
This commit is contained in:
@@ -999,6 +999,8 @@ int json_object_set_double(struct json_object *jso,double new_value){
|
||||
if (!jso || jso->o_type!=json_type_double)
|
||||
return 0;
|
||||
jso->o.c_double=new_value;
|
||||
if (jso->_to_json_string == &json_object_userdata_to_json_string)
|
||||
json_object_set_serializer(jso, NULL, NULL, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user