diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c index f4dfc428..aa5baee5 100644 --- a/libc/stdio/printf.c +++ b/libc/stdio/printf.c @@ -317,7 +317,7 @@ size_t xvasprintf(int (*callback)(void *, char), void * userData, const char * f OUT('n'); } break; - } else if (exponent == 0 && fraction == 0) { + } else if ((*f == 'g' || *f == 'G') && exponent == 0 && fraction == 0) { if (SIGNBIT(asBits)) { OUT('-'); }