==3096== Invalid write of size 1
==3096== at 0x8173F3E: go_tiles() (zq_tiles.cpp:288)
==3096== by 0x818E1B4: select_tile(int&, int&, int, int&, bool, int) (zq_tiles.cpp:6984)
==3096== by 0x806CA0A: domouse() (zquest.cpp:7101)
==3096== by 0x8097C44: d_nbmenu_proc(int, DIALOG*, int) (zquest.cpp:22161)
==3096== by 0x831F6F1: object_message (gui.c:353)
==3096== by 0x849BD97: ? (in /home/user/Games/Zelda Classic/Latest build/zquest-l)
==3096== Address 0x116a200f is 7 bytes after a block of size 0 alloc'd
==3096== at 0x64AB018: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==3096== by 0x8173DFB: go_tiles() (zq_tiles.cpp:267)
==3096== by 0x818E1B4: select_tile(int&, int&, int, int&, bool, int) (zq_tiles.cpp:6984)
==3096== by 0x806CA0A: domouse() (zquest.cpp:7101)
==3096== by 0x8097C44: d_nbmenu_proc(int, DIALOG*, int) (zquest.cpp:22161)
==3096== by 0x831F6F1: object_message (gui.c:353)
==3096== by 0x849BD97: ? (in /home/user/Games/Zelda Classic/Latest build/zquest-l)
I think I just opened ZQuest and went straight to the tile pages via right-clicking in the combo list.
The 0-byte malloc suggests an invalid tile color depth. It's not saved that way in the quest file, and it's not loading incorrectly. I haven't seen that happen again, and I haven't caught any other invalid writes. I've got no idea what might have happened.


