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

Fix issue where Ctrl-C would leave a 'N' in the keyboard input buffer

This problem doesn't happen with the .bin version of these scripts.
parent 52e8c928
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -30,10 +30,8 @@ while(bbs.online && !js.terminated) {
var key = console.getkey(0).toUpperCase();
console.backspace(console.strlen(str));
console.print("\x01n\x01h\x01>");
if(console.aborted) {
affirm = false;
if(console.aborted)
break;
}
if(key == '\r')
break;
if(key == yes_key) {
......@@ -47,4 +45,5 @@ while(bbs.online && !js.terminated) {
affirm = !affirm;
}
console.ungetstr(affirm ? yes_key : no_key);
if(!console.aborted)
console.ungetstr(affirm ? yes_key : no_key);
......@@ -31,10 +31,8 @@ while(bbs.online && !js.terminated) {
var key = console.getkey(0).toUpperCase();
console.backspace(console.strlen(str));
console.print("\x01n\x01h\x01>");
if(console.aborted) {
affirm = false;
if(console.aborted)
break;
}
if(key == '\r')
break;
if(key == yes_key) {
......@@ -48,4 +46,5 @@ while(bbs.online && !js.terminated) {
affirm = !affirm;
}
console.ungetstr(affirm ? yes_key : no_key);
if(!console.aborted)
console.ungetstr(affirm ? yes_key : no_key);
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