Amiga: bound BufferQueueChar; move CloseWindow out of Forbid()

Make the BufferQueueChar macro bounds-check KbdBuffered against
KBDBUFFER internally so the RAWKEY and NEWSIZE 'R'-64 paths can
no longer push past the 10-byte queue; widen KbdBuffered to int
so the counter cannot wrap silently in the queue-scan loops.

In amii_cleanup move kill_nhwindows()/DeleteMsgPort() outside
the Forbid()/Permit() pair: CloseWindow can wait on layers.library
semaphores on OS 3.x and that is unsafe under Forbid.  Keep only
the IDCMP-flush loop inside.
This commit is contained in:
Ingo Paschke
2026-05-12 15:28:43 +02:00
parent 252ca5bef7
commit 4e63ba90ca
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ extern struct Menu HackMenu[];
extern struct Menu *MenuStrip;
extern struct NewMenu GTHackMenu[];
extern APTR *VisualInfo;
extern unsigned char KbdBuffered;
extern int KbdBuffered;
extern struct TextFont *TextsFont;
extern struct TextFont *HackFont;
extern struct IOStdReq ConsoleIO;