https://gitlab.synchro.net/main/sbbs/-/commit/e6742dcb3a7878ae2abfaedb
Modified Files:
src/doors/termgfx/termgfx_termio.c
Log Message:
termgfx: resolve a pending lone ESC after the read, not before
termgfx_termio_pump() already drained the client each pump, so a sequence
split by the 256-byte read buffer completed in the same pump and the lone-ESC timer never saw it. What it could still see was a sequence split across pumps: the ESC read while the socket was empty, its tail arriving afterwards, the
next pump more than TERMGFX_ESC_TIMEOUT_MS later. The check ran first, so that tail was decoded as ordinary keys behind an Escape the client never sent.
Move the check below the loop and leave the loop by break rather than return, so only the "nothing left to read" exit reaches it. The hard-error and EOF exits still return -- the peer is gone and an Escape would go nowhere.
Behavior for a genuinely lone Escape is unchanged, which matters: SyncTERM sends a bare 0x1b for that key, and the doors on this path are driven from its menus. Affects SyncRPG, SyncSCUMM and SyncRetro.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net