]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/textparser.cpp
Don't throw on empty files
[libs/datafile.git] / 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;
        }