Mercurial > hg > th-libs
changeset 390:eb79d11d8d40
If f_width is not specified, initialize it to -1.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 03 Mar 2016 13:49:45 +0200 |
parents | 0e5511015bd2 |
children | 6e6c8c4fc210 |
files | th_string.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/th_string.c Thu Mar 03 13:45:11 2016 +0200 +++ b/th_string.c Thu Mar 03 13:49:45 2016 +0200 @@ -369,7 +369,7 @@ } else { - int f_width = 0, f_prec = -1, f_flags = 0; + int f_width = -1, f_prec = -1, f_flags = 0; BOOL end = FALSE; fmt++; @@ -423,6 +423,7 @@ } else { + f_width = 0; while (th_isdigit(*fmt)) f_width = f_width * 10 + (*fmt++ - '0'); }