fix github issue #955 - tile2bmp bounds failure

Issue reported by argrath:  building with 'address sanitizing'
reported tile2bmp writing out of array bounds after the addition
of the generic object tiles.

'MAGICTILENO' in tile2bmp.c is extremely fragile.  It was already
inaccurate before the generic tiles, but had a big enough value to
handle the final row of tiles prior to that.

Fixes #955
This commit is contained in:
PatR
2023-01-12 03:12:56 -08:00
parent 9bf6d837ad
commit a7756a1327
4 changed files with 28 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
# objects.txt - tile defintions for objects
# Note: if the number of monster tiles, object tiles, or other tiles
# changes, 'MAGICTILENO' in tile2bmp.c needs to be updated to match!
# Note too: lines beginning with '# tile ' are not comments; other
# lines beginning with '#' are.
. = (71, 108, 108)
A = (0, 0, 0)
B = (0, 182, 255)