rem: while(ret+=get_next_keys("0123456789\r\n",have_part)) { if(parseInt(ret+'0') > max) return(parseInt(ret)); if(ret.search(/[\r\n]/)!=-1) return(parseInt(ret)); 
add: while(1) { ch=get_next_keys("0123456789\r\n",have_part); if(ch==undefined || ch=='') return(-1); if(parseInt(ret+ch)<=max) { ret+=ch; write(ch); if(parseInt(ret+'0') > max) return(parseInt(ret)); if(ret.search(/[\r\n]/)!=-1) return(parseInt(ret)); } 
context: function get_next_num(max, have_part){	var ret='';	var use_str=false;	if(bbs.command_str.length && (user.settings & USER_COLDKEYS))		use_str=true;	while(ret+=get_next_keys("0123456789\r\n",have_part)) {		if(parseInt(ret+'0') > max)			return(parseInt(ret));		if(ret.search(/[\r\n]/)!=-1)			return(parseInt(ret));		// Using coldkeys and there was something in STR and there was a number		if(use_str && !bbs.command_str.length && parseInt(ret)>0)			return(parseInt(ret));	}	return(console.getnum(max));}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/df3ca111ad55e014b8cfb16181b992379db63f40/coldfuncs.js/buggy/load/coldfuncs.js