Commit 1986da81 authored by Rob Swindell's avatar Rob Swindell

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 d8db037c
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment