Mercurial > hg > nginx
changeset 1863:8382d94ba6ae
allow zero length in %*s
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 22 Jan 2008 15:13:01 +0000 |
parents | 04b04e6d60f4 |
children | 524831ec3e69 |
files | src/core/ngx_string.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -147,7 +147,7 @@ ngx_vsnprintf(u_char *buf, size_t max, c sign = 1; hexadecimal = 0; max_width = 0; - slen = 0; + slen = (size_t) -1; p = temp + NGX_INT64_LEN; @@ -221,7 +221,7 @@ ngx_vsnprintf(u_char *buf, size_t max, c case 's': p = va_arg(args, u_char *); - if (slen == 0) { + if (slen == (size_t) -1) { while (*p && buf < last) { *buf++ = *p++; }