SpectralCascade / Ossium

Ossium is a bare-bones game engine built in C++ with only essential dependencies.

Home Page:https://ossiumengine.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nasty memory corruption bug

SpectralCascade opened this issue · comments

global::delta.time() is currently returning the correct value before and after the UpdateComponents() call in main.cpp, but within the method global::delta.time() returns 0! Highly suspect there's some corruption going on.

Unbelievably this bug is even as far back as 33b284e. Suspect the ECS has something dodgy. This is a properly bizarre bug!

Ha, fixed it! For some foolish reason I made global::delta static, resulting in multiple copies of it cropping up wherever the delta.h file was #included. 🤦‍♂️ So in other news I now understand why extern is a thing :P at least it wasn't a corruption bug, I suppose.