jpaver / opengametools

A set of open c++ game development tools that are lightweight, easy-to-integrate and free to use. Currently hosting a magicavoxel .vox full scene loader.
MIT License
373 stars 35 forks source link

Fix assertion #11

Closed LLLida closed 3 years ago

LLLida commented 3 years ago

In find_closest_color_in_palette best_score is declared as int32_t. It's value is always <UINT32_MAX and assertion will always succeed(even in bad situations when bad_score is INT32_MAX). As I understand from code best_score should be compared to INT32_MAX not UINT32_MAX.

jpaver commented 3 years ago

Nice catch, thanks for the fix!