5

Another terrible rant from the inhereted Hydra source code. So deep in the dark dungeon of that code I noticed something interesting. They declare this INT32 array with an incredibly long (like 200 values) list of hard coded magic numbers. Something along the lines of:

INT32 array[200] = {-1,0,1,21,4,7,19,33...};

However, the resulting output was incorrect. After spending a fort night and a good chunk of my remaining sanity I had overcone the 437 levels of indirection left by the previous programmers, and narrowed it down to this line. But it looked perfectly fine.

I pull up the diffs and notice someone had checked in a change to the source. I track it to this line and find what the original data had been.

INT32 array[200] = {-1,0,1,2l,4,7,19,33...};

In VS the default font shows l and 1 as fucking identical. Someone had accidentally made that change to 21 from the original 2l and checked it in. I mean I can't really blame them. Who the fucking hell inatantiates a fucking int32 array and peppers in a fucking 2l (long) for no fucking reason?!

Comments
Add Comment