From 35ee90cbdd763e7f3489a6e0d32e3d5841ed3053 Mon Sep 17 00:00:00 2001 From: zsknight <> Date: Tue, 1 May 2001 07:42:00 +0000 Subject: [PATCH] Fixed crashing problem when a quick load item is loaded while the load box is opened. --- zsnes/src/gui/guiload.inc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/zsnes/src/gui/guiload.inc b/zsnes/src/gui/guiload.inc index bb2ec825..d43b5c8d 100644 --- a/zsnes/src/gui/guiload.inc +++ b/zsnes/src/gui/guiload.inc @@ -1433,6 +1433,25 @@ NEWSYM DTALoc, times 2048+32 db 0 ; Routines to load from the Quick Menu loadquickfname: +.trynext + cmp byte[GUIwinptr],0 + je near .noclose + xor eax,eax + mov al,[GUIwinptr] + dec eax + xor ebx,ebx + mov bl,[GUIwinorder+eax] + ; close window + mov byte[GUIwinorder+eax],0 + mov byte[GUIwinactiv+ebx],0 + dec byte[GUIwinptr] + cmp byte[GUIwinptr],0 + jne .noclose + mov al,[GUIpmenupos] + mov [GUIcmenupos],al + jmp .trynext +.noclose + ; move menuitem to top cmp ecx,0 je near .nomove