]> git.tdb.fi Git - libs/datafile.git/commitdiff
Don't throw on empty files
authorMikko Rasa <tdb@tdb.fi>
Sun, 26 Sep 2010 09:29:47 +0000 (09:29 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sun, 26 Sep 2010 09:29:47 +0000 (09:29 +0000)
source/textparser.cpp

index 8bcde35802108ba2f16c32584e6ace17b1e33ee9..0076c1b4bab954f8a893abf9f2e6a4ff7da5039a 100644 (file)
@@ -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;
        }