From: Mikko Rasa Date: Sun, 26 Sep 2010 09:29:47 +0000 (+0000) Subject: Don't throw on empty files X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=3b70a4d95e414f63fd39b4325d0f639c155a70f5;p=libs%2Fdatafile.git Don't throw on empty files --- diff --git a/source/textparser.cpp b/source/textparser.cpp index 8bcde35..0076c1b 100644 --- a/source/textparser.cpp +++ b/source/textparser.cpp @@ -121,7 +121,7 @@ Token TextParser::parse_token() comment = 3; else if(comment==3) // Skip the second character of block comment end comment = 0; - else if(!isspace(c) && !comment) + else if(c!=-1 && !isspace(c) && !comment) comment = -1; }