diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 01fe98f239..7a5f9b3614 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -4019,10 +4019,9 @@ QString QString::section(const QString &sep, int start, int end, SectionFlags fl if (start >= sectionsSize || end < 0 || start > end) return QString(); - int x = 0; QString ret; int first_i = start, last_i = end; - for (int i = 0; x <= end && i < sectionsSize; ++i) { + for (int x = 0, i = 0; x <= end && i < sectionsSize; ++i) { const QStringRef §ion = sections.at(i); const bool empty = section.isEmpty(); if (x >= start) { |