Skip to content

Comment on Ask YC: Your most interesting bugs / bug fixes?

Comments

One bug I had to fix recently was in the commentary system of a PS2 soccer game (with an ancient codebase, parts of which hadn't been touched in 10 years).

The commentator would always refer to a particular player on a particular team by the name of a different player on that team. No-one had any idea why.

This issue had been knocking around for years and somehow ended up on my plate. After about 3 or 4 days of digging around and finding nothing, I finally got to the bottom of it. It just so happened that subtracting the ID's of the two players in question gave exactly 65536. It didn't take me much longer to figure out that the game's database used 32 bit integers for player ID's, and the commentary system was using 16 bit integers, so from the commentary's point of view, the two players had the same ID.

Luckily for me, I was able to fix it by swapping in a slightly-less-ancient commentary system which used 32 bit IDs instead.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.