Merge pull request #36 from terickson001/printf_width_fix

Fixed printf variable width
This commit is contained in:
gingerBill 2018-05-20 16:03:59 +01:00 committed by GitHub
commit 296198c81b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

4
gb.h
View File

@ -8483,9 +8483,9 @@ gb_no_inline isize gb_snprintf_va(char *text, isize max_len, char const *fmt, va
int width = va_arg(va, int); int width = va_arg(va, int);
if (width < 0) { if (width < 0) {
info.flags |= gbFmt_Minus; info.flags |= gbFmt_Minus;
info.width = -info.width; info.width = -width;
} else { } else {
info.width = -info.width; info.width = width;
} }
fmt++; fmt++;
} else { } else {