Recent versions of Xojo fixed some longstanding bugs with 32 / 64 bit math not working as expected. Perhaps you were relying on one of those bugs by accident?
See https://forum.xojo.com/t/xojo-math-badly-broken-32bit-problems-in-a-64bit-environment/
Edit: specifically, I’m referring to MaxUInt32 which I see in your code.