diff options
author | Dave Beckett <dave@dajobe.org> | 2012-03-11 12:59:51 -0700 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2012-03-11 12:59:51 -0700 |
commit | 51155f3cd58f061c3b867375b435c1d75c46df52 (patch) | |
tree | b1d3e4f89f1670e083591ff18aa637d87193c660 /src/snprintf.c | |
parent | e0397bfbd81e1c6c17fdd6897ff20e0862acf461 (diff) | |
download | raptor-51155f3cd58f061c3b867375b435c1d75c46df52.tar.gz |
(raptor_format_integer): cast for comparing width to len
Diffstat (limited to 'src/snprintf.c')
-rw-r--r-- | src/snprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/snprintf.c b/src/snprintf.c index 2a4aee9f..0147402b 100644 --- a/src/snprintf.c +++ b/src/snprintf.c @@ -308,7 +308,7 @@ raptor_format_integer(char* buffer, size_t bufsize, int integer, while(value /= base) len++; - if(width > 0 && width > len) + if(width > 0 && RAPTOR_GOOD_CAST(size_t, width) > len) len = width; if(!buffer || bufsize < RAPTOR_GOOD_CAST(size_t, (len + 1))) /* +1 for NUL */ |