neophob / wpc-emu

Williams Pinball machine emulator, Play it @
https://playfield.dev
Apache License 2.0
68 stars 12 forks source link

BitMagic documentation / implementation mismatch #73

Closed ecurtz closed 3 years ago

ecurtz commented 3 years ago

As described here on the C# port the BitMagic function for MSB doesn't actually perform as the comment implies and the current implementation will break if more than a single bit is set.

https://github.com/jsm174/wpc-emu-cs/issues/1#issue-746781527

neophob commented 3 years ago

Thanks @ecurtz - the comment was pretty banana! I just removed the useless comment anyway and added a test case!

neophob commented 3 years ago

https://github.com/neophob/wpc-emu/commit/c150b3d7c38b81027105d3bcfb39e44cd643353d is the fix