Closed pezcode closed 3 years ago
Thanks for the PR! Can you fix the failed test on Ubuntu? https://github.com/jkuhlmann/cgltf/pull/165/checks?check_run_id=3625925333
I hope that fixes it 🙇
A bit mysterious why I didn't get those errors when compiling through test_all.py
with the same GCC version as CI is using.
See https://github.com/jkuhlmann/cgltf/issues/163 for background information.
The new function is called
cgltf_decode_string
and decodes all valid JSON escape sequences in-place. There are some assumptions in the code about the validity of escape sequences which were all previously checked by jsmn (or json parsing fails). Using this function with any string not fromcgltf_data
might break in funny ways, but I don't see the point of checking the same thing twice.I also added tests for
cgltf_decode_string
as well ascgltf_decode_uri
and verified that they pass under MSVC 2019 and Clang 10.