logoalt Hacker News

PaulKeebletoday at 9:38 AM1 replyview on HN

Its interesting to see how bad assumptions that almost certainly held up at the time really don't any more and that leads to this bug being exposed. Modern machines have a lot more addressable devices and a failure to properly filter and using a vector ultimately leads to a bug that on the surface feels like since it works on Win98 must be caused by Windows but isn't.


Replies

gambitingtoday at 4:12 PM

I mean that's just a bad assumption no matter how anyone looks at it - if you created an array for 8 devices then just stop adding to it when you reach 8. The "a user will never have more than 8 gamepads" is a bad assumption because the logical question then is "what if they do" and the answer even back in the day would have been "the game will crash" which isn't how any code should be written. Stop processing at 8 if you are so sure there will never be more than 8, but have the most basic sanity checks.

show 1 reply