stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r538676 - /incubator/stdcxx/trunk/examples/manual/mbsrtowcs.cpp
Date Wed, 16 May 2007 18:21:29 GMT
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  <sebor@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;
 



Mime
View raw message