Skip to content
Snippets Groups Projects
Commit 1ed50424 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Better comment conformance in key parsing

There's a comment saying we set key=0 when we consume it... do so
in a couple cases where it wasn't done.

Range check the key before sending to the remote.

This should not actually do anything different, but in the future
if things are changed at least the comments won't be misleading.
parent 37b74cb5
Branches
Tags
No related merge requests found
......@@ -2770,6 +2770,7 @@ BOOL doterm(struct bbslist *bbs)
break;
case CIO_KEY_SHIFT_IC: /* Shift-Insert - Paste */
do_paste();
key = 0;
break;
case 0x3000: /* ALT-B - Scrollback */
setup_mouse_events(NULL);
......@@ -2814,6 +2815,7 @@ BOOL doterm(struct bbslist *bbs)
}
showmouse();
_setcursortype(_NORMALCURSOR);
key = 0;
}
break;
case 0x2100: /* ALT-F */
......@@ -3331,7 +3333,7 @@ BOOL doterm(struct bbslist *bbs)
key='\b';
/* FALLTHROUGH to default */
default:
if(key<256) {
if(key<256 && key >= 0) {
ch[0]=key;
conn_send(ch,1,0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment