Skip to content
Snippets Groups Projects
Commit 27723a48 authored by deuce's avatar deuce
Browse files

Support Q in get_next_num()

Properly support \r and \n
parent d6b1cff8
Branches
Tags
No related merge requests found
......@@ -51,9 +51,11 @@ function get_next_num(max, have_part)
if(bbs.command_str.length && (user.settings & USER_COLDKEYS))
use_str=true;
while(1) {
ch=get_next_keys("0123456789\r\n",have_part);
if(ch==undefined || ch=='')
ch=get_next_keys("0123456789Q\r\n",have_part);
if(ch==undefined || ch=='' || ch=='Q')
return(-1);
if(ch=='\r' || ch=='\n')
return(parseInt(ret));
if(parseInt(ret+ch)<=max) {
ret+=ch;
write(ch);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment