From 2b192a4fb5e23ec2a69c59e4ffbb196c90d99e6e Mon Sep 17 00:00:00 2001 From: Gallaecio Date: Sat, 26 Apr 2014 16:05:41 +0000 Subject: [PATCH] Do not call Translate() on empty lines Reported by Yves at Github: https://github.com/leper/0ad/issues/11 This was SVN commit r15003. --- source/i18n/L10n.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/i18n/L10n.cpp b/source/i18n/L10n.cpp index 990613d329..233bb818c0 100644 --- a/source/i18n/L10n.cpp +++ b/source/i18n/L10n.cpp @@ -329,7 +329,8 @@ std::string L10n::TranslateLines(const std::string& sourceString) std::string line; while (std::getline(stringOfLines, line)) { - targetString.append(Translate(line)); + if (!line.empty()) + targetString.append(Translate(line)); targetString.append("\n"); }