mirror of
https://github.com/json-c/json-c.git
synced 2026-03-21 14:09:06 +08:00
Merge pull request #742 from rouault/json_object_copy_serializer_data_add_assertion
json_object_copy_serializer_data(): add assertion
This commit is contained in:
@@ -1588,6 +1588,7 @@ static int json_object_copy_serializer_data(struct json_object *src, struct json
|
||||
if (dst->_to_json_string == json_object_userdata_to_json_string ||
|
||||
dst->_to_json_string == _json_object_userdata_to_json_string)
|
||||
{
|
||||
assert(src->_userdata);
|
||||
dst->_userdata = strdup(src->_userdata);
|
||||
}
|
||||
// else if ... other supported serializers ...
|
||||
|
||||
Reference in New Issue
Block a user