From 669df123648aaa6aeccc70206b5417bc48b4e9ae Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:26:50 +0200 Subject: 5.19 --- lib/parse_lng.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/parse_lng.h') diff --git a/lib/parse_lng.h b/lib/parse_lng.h index 8cd8e943..be47b66b 100644 --- a/lib/parse_lng.h +++ b/lib/parse_lng.h @@ -294,7 +294,7 @@ private: static void normalize(std::string& text) { - zen::trim(text); //remmove whitespace from end + zen::trim(text); //remove whitespace from both ends //Delimiter: //---------- @@ -378,8 +378,11 @@ private: if (token().type == Token::TK_PLURAL_BEGIN) return parsePlural(pluralOut, pluralInfo); + if (token().type != Token::TK_TEXT) + throw ParsingError(L"Source text empty", scn.posRow(), scn.posCol()); std::string original = tk.text; - consumeToken(Token::TK_TEXT); + nextToken(); + consumeToken(Token::TK_SRC_END); consumeToken(Token::TK_TRG_BEGIN); -- cgit