Skip to content
Snippets Groups Projects
Commit 06cb545a 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 018adfa4
Branches
Tags
No related merge requests found
......@@ -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.
Please register or to comment