You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/05/16 20:21:29 UTC
svn commit: r538676 - /incubator/stdcxx/trunk/examples/manual/mbsrtowcs.cpp
Author: sebor
Date: Wed May 16 11:21:28 2007
New Revision: 538676
URL: http://svn.apache.org/viewvc?view=rev&rev=538676
Log:
2007-05-16 Martin Sebor <se...@roguewave.com>
* mbsrtowcs.cpp: NUL-terminated destination sequence before
writing it out to stdout.
Modified:
incubator/stdcxx/trunk/examples/manual/mbsrtowcs.cpp
Modified: incubator/stdcxx/trunk/examples/manual/mbsrtowcs.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/examples/manual/mbsrtowcs.cpp?view=diff&rev=538676&r1=538675&r2=538676
==============================================================================
--- incubator/stdcxx/trunk/examples/manual/mbsrtowcs.cpp (original)
+++ incubator/stdcxx/trunk/examples/manual/mbsrtowcs.cpp Wed May 16 11:21:28 2007
@@ -198,6 +198,9 @@
continue;
}
+ // NUL-terminate the converted string
+ dst [nconv] = L'\0';
+
// write out the wide and the narrow sequences
std::cout << "UCS-2 (" << std::dec << length << "): " << std::hex;