mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-09-16 23:34:35 +00:00
Fix tester_v3_c base-dir split on Windows paths
parse_path_for_test() split the file path on '/' only, so a Windows style arg like models\Cube\Cube.gltf produced an empty base dir and external buffers (Cube.bin) failed to resolve. Split on '\' too.
This commit is contained in:
@@ -1409,6 +1409,7 @@ static int parse_path_for_test(tg3_model *model, tg3_error_stack *errors,
|
||||
}
|
||||
|
||||
slash = strrchr(path, '/');
|
||||
if (!slash) slash = strrchr(path, '\\');
|
||||
base_len = slash ? (uint32_t)(slash - path) : 0;
|
||||
err = tg3_parse_auto(model, errors, buf, (uint64_t)sz, path, base_len, opts);
|
||||
free(buf);
|
||||
|
||||
Reference in New Issue
Block a user