OSDN Git Service

2003-11-24 Artem B. Bityuckiy <mail_lists@mail.ru>
authorjjohnstn <jjohnstn>
Mon, 24 Nov 2003 18:39:04 +0000 (18:39 +0000)
committerjjohnstn <jjohnstn>
Mon, 24 Nov 2003 18:39:04 +0000 (18:39 +0000)
        * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix check for 'C' format
        specifier to use ch instead of *fmt.

newlib/ChangeLog
newlib/libc/stdio/vfprintf.c

index b0cd71d..f9939c3 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-24  Artem B. Bityuckiy  <mail_lists@mail.ru>
+
+       * libc/stdio/vfprintf.c (_VFPRINTF_R): Fix check for 'C' format
+       specifier to use ch instead of *fmt.
+
 2003-11-21  Artem B. Bityuckiy  <mail_lists@mail.ru>
 
        * libc/stdio/vfprintf.c (_VFPRINTF_R, get_arg): Move mb-specific
index 62989fd..743d307 100644 (file)
@@ -746,7 +746,7 @@ reswitch:   switch (ch) {
                case 'c':
                case 'C':
                        cp = buf;
-                       if (*fmt == 'C' || (flags & LONGINT)) {
+                       if (ch == 'C' || (flags & LONGINT)) {
                                mbstate_t ps;
 
                                memset((void *)&ps, '\0', sizeof(mbstate_t));