From 258f968327f6e790e11e809070c5ea5dc21a299c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 May 2012 16:01:04 +0300 Subject: Fix files translation. Line was not translated if at first position was characters "<<". --- src/utils/translation/translationmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/utils/translation/translationmanager.cpp b/src/utils/translation/translationmanager.cpp index 0c20f1392..4c811ab60 100644 --- a/src/utils/translation/translationmanager.cpp +++ b/src/utils/translation/translationmanager.cpp @@ -102,8 +102,9 @@ bool TranslationManager::translateFile(const std::string &fileName, } std::string str = std::string(fileContents, contentsLength); - size_t oldPos1 = 0; + size_t oldPos1 = std::string::npos; size_t pos1; + while ((pos1 = str.find("<<")) != std::string::npos) { if (pos1 == oldPos1) -- cgit v1.2.3-70-g09d2