diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-12-07 05:08:30 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-12-07 05:08:30 (GMT) |
commit | 569dfab376d9f63422791566d1888618934ffdc3 (patch) | |
tree | 7098d0e33f0cdb19b144f33318210bf801575c42 /src/corelib/codecs/qiconvcodec.cpp | |
parent | e68fa8d463ff10f7eb2b486362ef73eea9271ff8 (diff) | |
parent | bd23da275dc88951e17137ef02147c9b5499bce7 (diff) | |
download | Qt-569dfab376d9f63422791566d1888618934ffdc3.zip Qt-569dfab376d9f63422791566d1888618934ffdc3.tar.gz Qt-569dfab376d9f63422791566d1888618934ffdc3.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
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); |