diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qurlrecode.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/io/qurlrecode.cpp b/src/corelib/io/qurlrecode.cpp index b586bd7a1e..de9c5aa7db 100644 --- a/src/corelib/io/qurlrecode.cpp +++ b/src/corelib/io/qurlrecode.cpp @@ -483,6 +483,8 @@ static int recode(QString &result, const ushort *begin, const ushort *end, QUrl: // try a run where no change is necessary for ( ; input != end; ++input) { c = *input; + if (c < 0x20U) + action = EncodeCharacter; if (c < 0x20U || c >= 0x80U) // also: (c - 0x20 < 0x60U) goto non_trivial; action = EncodingAction(actionTable[c - ' ']); @@ -534,9 +536,6 @@ non_trivial: } } - if (decoded < 0x20) - action = EncodeCharacter; - // there are six possibilities: // current \ action | DecodeCharacter | LeaveCharacter | EncodeCharacter // decoded | 1:leave | 2:leave | 3:encode |