This fixes some undefined behaviour in cgltf_decode_string added in https://github.com/jkuhlmann/cgltf/pull/165. Overlapping memory in any of the str* functions turns out to be UB caught by ASan.
It might be worth adding target_link_libraries(${EXE_NAME} -fsanitize=address) to the test CMake targets to catch similar errors in the future.
This fixes some undefined behaviour in
cgltf_decode_string
added in https://github.com/jkuhlmann/cgltf/pull/165. Overlapping memory in any of thestr*
functions turns out to be UB caught by ASan.It might be worth adding
target_link_libraries(${EXE_NAME} -fsanitize=address)
to the test CMake targets to catch similar errors in the future.