]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix mbrtowc example.
authorAndré Goddard Rosa <andre.goddard@gmail.com>
Mon, 1 Jun 2009 18:43:26 +0000 (11:43 -0700)
committerPetr Baudis <pasky@suse.cz>
Fri, 5 Jun 2009 21:09:06 +0000 (23:09 +0200)
The remaining bytes were not copied correctly.
(cherry picked from commit 21e66bc528edcbe18d434eb33a601e0f796904c9)

manual/charset.texi

index 8b2c09ca79a4644eb4f6a7eac155bc5f3b189621..79854e50bfcbda3ccb2909c934abbce7a91d0299 100644 (file)
@@ -1234,7 +1234,7 @@ file_mbsrtowcs (int input, int output)
       /* @r{If any characters must be carried forward,}
          @r{put them at the beginning of @code{buffer}.} */
       if (filled > 0)
-        memmove (inp, buffer, filled);
+        memmove (buffer, inp, filled);
     @}
 
   return 1;