diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
commit | 669df123648aaa6aeccc70206b5417bc48b4e9ae (patch) | |
tree | 463c107a8d6405020bb304f7a7253e6b64afeee0 /lib/parse_lng.h | |
parent | 5.18 (diff) | |
download | FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2 FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip |
5.19
Diffstat (limited to 'lib/parse_lng.h')
-rw-r--r-- | lib/parse_lng.h | 7 |
1 files changed, 5 insertions, 2 deletions
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); |