Clean up bugs commented in the source code (#912)

Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
vulcandth
2022-07-09 16:12:02 -05:00
committed by GitHub
parent bd27c0d8dc
commit ef9b9bb437
49 changed files with 267 additions and 324 deletions

View File

@@ -1240,11 +1240,7 @@ Script_memcall:
; fallthrough
ScriptCall:
; Bug: The script stack has a capacity of 5 scripts, yet there is
; nothing to stop you from pushing a sixth script. The high part
; of the script address can then be overwritten by modifications
; to wScriptDelay, causing the script to return to the rst/interrupt
; space.
; BUG: ScriptCall can overflow wScriptStack and crash (see docs/bugs_and_glitches.md)
push de
ld hl, wScriptStackSize