Open jinyangcruise opened 2 months ago
The parent makes it recursively calls write
many times.
for (const PropertyInfo &E : props) {
if (E.usage & PROPERTY_USAGE_STORAGE || E.usage & PROPERTY_USAGE_SCRIPT_VARIABLE) {
//must be serialized
if (first) {
first = false;
} else {
p_store_string_func(p_store_string_ud, ",");
}
p_store_string_func(p_store_string_ud, "\"" + E.name + "\":");
write(obj->get(E.name), p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, p_recursion_count, p_compat);
}
}
Tested versions
System information
Windows 11, Vulkan API 1.3.205 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3060 Ti
Issue description
In some cases, var_to_str may lead to an infinite loop. for example:
Steps to reproduce
Minimal reproduction project (MRP)
test_var_to_str.zip