syoyo / tinygltf

Header only C++11 tiny glTF 2.0 library
MIT License
2.04k stars 413 forks source link

[TODO] Remove C assert #425

Open syoyo opened 1 year ago

syoyo commented 1 year ago

Describe the issue

tinygltf has some C assert, which is not recommended to run tinygltf in secure environment. (e.g. read malcious glTF file in a server)

The code should not segfault and errors should be reported properly. Removing assert recommended.

To Reproduce

Expected behaviour

No assert in tiny_gltf.h. (Raise an C++ exception when TINYGLTF_NOEXCEPTION is not set(an app is compiled with C++ exception enabled))

Screenshots

N/A

Additional context

N/A

syoyo commented 1 year ago

Prepared remove-assert branch: https://github.com/syoyo/tinygltf/tree/remove-assert