[uClibc-cvs] uClibc/libc/stdio stdio.c,1.63,1.64

Manuel Novoa III mjn3 at uclibc.org
Sun Jan 5 04:47:30 UTC 2003


Update of /var/cvs/uClibc/libc/stdio
In directory winder:/tmp/cvs-serv9496/libc/stdio

Modified Files:
	stdio.c 
Log Message:
Fix a silly bug in _wstdio_fwrite.  wprintf %s should now work correctly.


Index: stdio.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdio/stdio.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- stdio.c	20 Dec 2002 19:26:30 -0000	1.63
+++ stdio.c	5 Jan 2003 04:47:26 -0000	1.64
@@ -48,6 +48,8 @@
  *
  *  Nov 21, 2002
  *  Added internal function _wstdio_fwrite.
+ *  Jan 3, 2003
+ *  Fixed a bug in _wstdio_fwrite.
  */
 
 /* Before we include anything, convert L_ctermid to L_ctermid_function
@@ -3514,7 +3516,7 @@
 	pw = ws;
 	count = 0;
 	while (n > count) {
-		r = wcsnrtombs(buf, &pw, n, sizeof(buf), &stream->state);
+		r = wcsnrtombs(buf, &pw, n-count, sizeof(buf), &stream->state);
 		if (r != ((size_t) -1)) { /* No encoding errors */
 			if (!r) {
 				++r;		  /* 0 is returned when nul is reached. */




More information about the uClibc-cvs mailing list