Skip to content
Snippets Groups Projects
Commit 25b0e6d7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix lost 'unexpected characters' received in ANSI get cursor position response

Unexpected characters received (maybe typed by the user) were supposed to
be stuffed in the keyboard input buffer using ungetstr(), but the input string
was cleared rather than NUL-terminated before logging the expected character
and calling ungetstr(), so nothing (a blank string) was logged and nothing was
stuffed in the keyboard input-buffer in this case. Just an off-by-one bug.

This should fix issue #304. Thanks to Keyop and Nelgin for their persistence
in reporting and testing (in #synchronet at irc.synchro.net).
parent 1cdc4d8d
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3326 passed
......@@ -250,7 +250,7 @@ bool sbbs_t::ansi_getxy(int* x, int* y)
else if(ch=='R' && rsp)
break;
else {
str[rsp] = 0;
str[rsp + 1] = 0;
#ifdef _DEBUG
char dbg[128];
c_escape_str(str, dbg, sizeof(dbg), /* Ctrl-only? */true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment