mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 22:10:59 +00:00
Ensure that new empty console line are really empty.
This fixes a corner case: When the client is in state `ca_disconnected` and the user presses repeatedly return, there is a chance that a older line is erroneously printed again. This is caused by spinning through the console history buffer, when an old line is the current line a the frame were the console refreshs it's printed. Work around that by clearing every line as soon as it becomes the current line. Closes #987.
This commit is contained in:
parent
3a9b8de2ab
commit
a04809a66e
1 changed files with 2 additions and 1 deletions
|
@ -399,9 +399,10 @@ Key_Console(int key)
|
|||
|
||||
Cbuf_AddText("\n");
|
||||
Com_Printf("%s\n", key_lines[edit_line]);
|
||||
edit_line = (edit_line + 1) & (NUM_KEY_LINES-1);
|
||||
edit_line = (edit_line + 1) & (NUM_KEY_LINES - 1);
|
||||
history_line = edit_line;
|
||||
key_lines[edit_line][0] = ']';
|
||||
key_lines[edit_line][1] = '\0';
|
||||
key_linepos = 1;
|
||||
|
||||
if (cls.state == ca_disconnected)
|
||||
|
|
Loading…
Reference in a new issue