tng 2002/12/31 10:42:11
Modified: c/src/xercesc/util/Transcoders/Iconv IconvTransService.cpp
Log:
[Bug 15608] IconvLCPTranscoder::transcode() is wrong at wcstombs() usage.
Revision Changes Path
1.7 +4 -3
xml-xerces/c/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp
Index: IconvTransService.cpp
===================================================================
RCS file:
/home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- IconvTransService.cpp 2 Dec 2002 20:41:29 -0000 1.6
+++ IconvTransService.cpp 31 Dec 2002 18:42:11 -0000 1.7
@@ -382,14 +382,15 @@
wideCharBuf[wLent] = 0x00;
// Ok, go ahead and try the transcoding. If it fails, then ...
- if (::wcstombs(toFill, wideCharBuf, maxBytes) == -1)
+ size_t mblen ::wcstombs(toFill, wideCharBuf, maxBytes);
+ if (mblen == -1)
{
delete [] allocatedArray;
return false;
}
// Cap it off just in case
- toFill[wLent] = 0;
+ toFill[mblen] = 0;
delete [] allocatedArray;
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]