g-truc / glm

OpenGL Mathematics (GLM)
https://glm.g-truc.net
Other
9.1k stars 2.12k forks source link

Fix compare that is always true #1236

Closed bjornwah closed 7 months ago

bjornwah commented 7 months ago

strlen returns size_t which is unsigned so it is always >= 0. If the intention was that strlen(message) > 0 then the fix is something else.

Error with gcc 11.4.0: glm-src/glm/gtx/string_cast.inl:25:40: error: comparison of unsigned expression in ‘>= 0’ is always true [-Werror=type-limits]

christophe-lunarg commented 7 months ago

Thanks for contributing!