diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-04 18:36:19 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-12-04 18:36:19 (GMT) |
commit | f0bb9bc5b0f4c20536d6c77624bd148389b78c06 (patch) | |
tree | 9088a173de4bfbeea29bc9464d4cb46257df67cd /src/corelib/codecs/qiconvcodec.cpp | |
parent | 60be72310c0f9469b3201b250b257473184ccf2a (diff) | |
parent | 1bb5999cdca0a70df3f96d596c83c3cf7c97c5fd (diff) | |
download | Qt-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.cpp | 4 |
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); |