ArthurSonzogni / smk

SMK - Simple multimedia kit - C++ WebAssembly
MIT License
125 stars 18 forks source link

Update scroll.cpp #3

Closed TheMaverickProgrammer closed 3 years ago

TheMaverickProgrammer commented 3 years ago

Zero-initialize glm::vec2

Without this fix, the text reports a negative garbage value and never updates correctly.

ArthurSonzogni commented 3 years ago

I wrongly guessed glm::vec2 were zero initialized. Thanks!

TheMaverickProgrammer commented 3 years ago

Unfortunately it does not without brace initialization. At my day job, we had a nasty time tracing this on a huge codebase that had gone missed for a long time.