From 3b70a4d95e414f63fd39b4325d0f639c155a70f5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 26 Sep 2010 09:29:47 +0000 Subject: [PATCH] Don't throw on empty files --- source/textparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.45.2