scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 7c2fa317e86146c72d5548cc69a4b36752df33e1
parent 20db0c15edc7ca8bcc31188036be04fd64379a18
Author: Quentin Rameau <quinq@fifth.space>
Date:   Wed, 27 May 2020 09:52:21 +0200

libc: Fix vfprintf numeric sign convertion

When the value is signed, the signed convertion needs to be used
instead of the "unrelevant" unsigned one.

Diffstat:
Msrc/libc/stdio/vfprintf.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libc/stdio/vfprintf.c b/src/libc/stdio/vfprintf.c @@ -61,7 +61,7 @@ getnum(va_list *va, int flags, int *sign) if ((flags & UNSIGNED) == 0 && val < 0) { *sign = '-'; - uval = -uval; + uval = -val; } return uval; }