From: Eric Blake Date: Sun, 27 May 2007 14:19:15 +0000 (+0000) Subject: * libc/stdio/vfprintf.c (_VFPRINTF_R): Populate 'ox' when X-Git-Tag: preoverlapped~110 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=75acf0bb2e7f0ba0902a1c68145d0158cd3878ce;p=newlib-cygwin.git * libc/stdio/vfprintf.c (_VFPRINTF_R): Populate 'ox' when handling %p. --- diff --git a/newlib/ChangeLog b/newlib/ChangeLog index c175b2418..6d79bcbc0 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2007-05-27 Brian Dessent + + * libc/stdio/vfprintf.c (_VFPRINTF_R): Populate 'ox' when + handling %p. + 2007-05-25 Eric Blake * libc/stdio/rewind.c (rewind): Fix regression of 2003-08-22. diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 36b14afcc..0c1a47bb6 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -1021,7 +1021,8 @@ reswitch: switch (ch) { base = HEX; xdigs = "0123456789abcdef"; flags |= HEXPREFIX; - ch = 'x'; + ox[0] = '0'; + ox[1] = ch = 'x'; goto nosign; case 's': #ifdef _WANT_IO_C99_FORMATS