summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/codecs/qiconvcodec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/codecs/qiconvcodec.cpp b/src/corelib/codecs/qiconvcodec.cpp
index 8c4cc82..0fb78d5 100644
--- a/src/corelib/codecs/qiconvcodec.cpp
+++ b/src/corelib/codecs/qiconvcodec.cpp
@@ -378,7 +378,7 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
}
int invalidCount = 0;
- do {
+ while (inBytesLeft != 0) {
if (iconv(state->cd, inBytesPtr, &inBytesLeft, &outBytes, &outBytesLeft) == (size_t) -1) {
if (errno == EINVAL && convState) {
// buffer ends in a surrogate
@@ -418,7 +418,7 @@ QByteArray QIconvCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt
}
}
}
- } while (inBytesLeft != 0);
+ }
// reset to initial state
iconv(state->cd, 0, &inBytesLeft, 0, &outBytesLeft);