Skip to content
Snippets Groups Projects
Commit 5ae5891e authored by rswindell's avatar rswindell
Browse files

Detects a current_article value of NaN (not-a-number) and rejects it.

parent a6aac604
No related branches found
No related tags found
No related merge requests found
......@@ -409,7 +409,8 @@ while(client.socket.is_connected) {
else
current_article=Number(cmd[1]);
}
if(typeof(current_article)=="number" && current_article<1) {
if(typeof(current_article)=="number"
&& (current_article<1 || isNaN(current_article))) {
writeln("420 no current article has been selected");
break;
}
......@@ -419,7 +420,7 @@ while(client.socket.is_connected) {
hdr=msgbase.get_msg_header(false,current_article);
if(hdr==null) {
writeln("430 no such article found");
writeln("430 no such article found: " + current_article);
break;
}
......
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