This is a pretty serious fatal flaw and one of the most difficult I've ever had to deal with due to its nature. Originally, it seemed like a problem with the map loader, so I did some tests for that... everything checked out. So then, I thought maybe it was a problem with the menu exit code. That worked fine. So then I figured maybe it was a problem with some of the strcpy() functions that rebuild the palette... maybe the palette buffer was too close in RAM to the map coordinates (since this crash only happens when mapy >
. That wasn't it. So maybe it was simply in the position of the function... perhaps a cd_execoverlay transfer flaw. Reorganizing the function would fix that for sure. It didn't work. As a last resort, I reworked the overlay table by duplicating the module and placing it one slot higher... surely if this was the problem, it would be gone. Guess what? Problem still persists.
I am completely out of ideas at this point. The *only* thing I have to go on at this point is in the knowledge that this flaw only manifests when mapy > 8. My special text function fails to draw a proper dialogue box string when this happens, though hulib's put_number() still works normally. However, this problem does *not* manifest in *any other subprogram*... this is unique to this particular subprogram.
EDIT: Actually, both of my special text functions work just fine... they just fail after the menu is called up. That narrows the issue down further... there is something in the menu code itself causing this issue.