Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix infinite loop due to size/unsigned mismatch. #738
So fun story. size_t is "long unsigned int" on Linux 64-bit. That meas casting it to an unsigned int can lead to an infinite loop when checking against string::npos (since the cast value will always be truncated).
This was the only instance I came across, but it causes games that use d3d_model_load() with GL1 on Linux to spin forever and thrash my system.