diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-05 20:01:30 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-06 18:16:21 (GMT) |
commit | 14fc1147d156b9f600a66ec8a5bfc71e936f0bdf (patch) | |
tree | 19a72b3e385b0f42e4527cde4d1e8b3258ebfcd4 /tools | |
parent | 79f1414fabe097d1fb87b2f3153dcde910e0b2cb (diff) | |
download | Qt-14fc1147d156b9f600a66ec8a5bfc71e936f0bdf.zip Qt-14fc1147d156b9f600a66ec8a5bfc71e936f0bdf.tar.gz Qt-14fc1147d156b9f600a66ec8a5bfc71e936f0bdf.tar.bz2 |
fix number heuristics, part 1
Reviewed-by: TrustMe
Diffstat (limited to 'tools')
-rw-r--r-- | tools/linguist/lupdate/merge.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/linguist/lupdate/merge.cpp b/tools/linguist/lupdate/merge.cpp index fa0dd3d..1f006ea 100644 --- a/tools/linguist/lupdate/merge.cpp +++ b/tools/linguist/lupdate/merge.cpp @@ -63,7 +63,7 @@ static bool isDigitFriendly(QChar c) static int numberLength(const QString &s, int i) { - if (i < s.size() || !s.at(i).isDigit()) + if (i >= s.size() || !s.at(i).isDigit()) return 0; int pos = i; @@ -90,7 +90,7 @@ static QString zeroKey(const QString &key) QString zeroed; bool metSomething = false; - for (int i = 0; i != key.size(); ++i) { + for (int i = 0; i < key.size(); ++i) { int len = numberLength(key, i); if (len > 0) { i += len; |