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  <[EMAIL PROTECTED]>

        * 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;
 


Reply via email to