article thumbnail

Casting Values

Grumpy Gamer

After tracing through my compiler’s C++ code for about an hour trying to catch the spot, I came to this function: int intConstValue() { return _type == kFloat ? I guess I’m good until 2038… just in time for Unix time roll over. _float : _int; } It took me a bit of starring and then it hit.

Bug 130
article thumbnail

Casting Values

Grumpy Gamer

After tracing through my compiler's C++ code for about an hour trying to catch the spot, I came to this function: int intConstValue() { return _type == kFloat ? I guess I'm good until 2038. I have a scary Halloween story to tell you. I was running into a bug in my new compiler where large ints where loosing precision. _float : _int; }.

Bug 100