chiark / gitweb /
Noticed recently that bitcount16() isn't 16-bit clean due to signed
authorSimon Tatham <anakin@pobox.com>
Sat, 22 Oct 2005 16:38:15 +0000 (16:38 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 22 Oct 2005 16:38:15 +0000 (16:38 +0000)
commitb44d75aa4e97e9264e585712a8ec5fa757b645ec
tree7dbc77bdb3661c7f3c453e4310cfbcbbd6af630b
parentb7f192eea34e0bd36abcd457333ab37eb221789f
Noticed recently that bitcount16() isn't 16-bit clean due to signed
shift right. It doesn't actually matter in the current code since
the input word only ever uses the bottom 9 bits, but if I ever
extended Mines to work in a triangular grid then all 16 bits might
be required. Fix this now, while I'm cleaning things up, so that it
won't bite me unexpectedly in future.

[originally from svn r6415]
mines.c