diff --git a/extensions/translatewrapper.cpp b/extensions/translatewrapper.cpp index 4dced67..f74fad7 100644 --- a/extensions/translatewrapper.cpp +++ b/extensions/translatewrapper.cpp @@ -166,9 +166,9 @@ bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo) tokens.push(token); // popped one too many break; } - if (tokens.size() < tokenCount) tokens.push(current); - else return false; - return tokens.size() <= tokenCount; + bool available = tokens.size() < tokenCount; + if (available) tokens.push(current); + return available; } private: