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

strip_ctrl() now returns null (not "null") when passed null

This script had some funky work-arounds for the previous behavior, so adjust
them to recognize null input from the user. This fixes issue #201
reported by Ragnarok.
parent b874c380
No related branches found
No related tags found
No related merge requests found
......@@ -304,14 +304,14 @@ function MessageList(root,name,ext)
while(!this.file.eof)
{
var text=strip_ctrl(this.file.readln());
if(text=="null") break;
if(text=="null" || !text) break;
var author=text.substring(0,text.indexOf("@"));
var date=text.substr(text.indexOf("@")+1);
var message=[];
while(!this.file.eof)
{
var temp=this.file.readln();
if(strip_ctrl(temp)=="null" || strip_ctrl(temp)=="") break;
if(!temp || strip_ctrl(temp)=="null" || strip_ctrl(temp)=="") break;
message.push(temp);
}
this.array.push(new Post(author,date,message));
......
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