summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qiconvcodec.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-12-04 18:36:19 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-12-04 18:36:19 (GMT)
commitf0bb9bc5b0f4c20536d6c77624bd148389b78c06 (patch)
tree9088a173de4bfbeea29bc9464d4cb46257df67cd /src/corelib/codecs/qiconvcodec.cpp
parent60be72310c0f9469b3201b250b257473184ccf2a (diff)
parent1bb5999cdca0a70df3f96d596c83c3cf7c97c5fd (diff)
downloadQt-f0bb9bc5b0f4c20536d6c77624bd148389b78c06.zip
Qt-f0bb9bc5b0f4c20536d6c77624bd148389b78c06.tar.gz
Qt-f0bb9bc5b0f4c20536d6c77624bd148389b78c06.tar.bz2
Merge commit 'origin/4.6' into 4.6
Diffstat (limited to 'src/corelib/codecs/qiconvcodec.cpp')
-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);