diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-02-08 00:27:21 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-02-08 00:27:21 +0000 |
commit | bcc8f8f11a88655b3f9f59789a9171823fceb7ec (patch) | |
tree | 93869b451eeee9ab60f6f11ef5ba98fee0f642e0 | |
parent | bc375152b1626ca7dfa11587732de279a84b2c5f (diff) |
Ron Zapp <rzapper@yahoo.com> corrected a sprintf() problem
-rw-r--r-- | src/urlglob.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/urlglob.c b/src/urlglob.c index 846f86c2f..48974d1fa 100644 --- a/src/urlglob.c +++ b/src/urlglob.c @@ -277,7 +277,8 @@ char *next_url(URLGlob *glob) { *buf++ = pat->content.CharRange.ptr_c; break; case UPTNumRange: - buf += sprintf(buf, "%0*d", pat->content.NumRange.padlength, pat->content.NumRange.ptr_n); + sprintf(buf, "%0*d", pat->content.NumRange.padlength, pat->content.NumRange.ptr_n); + buf += strlen(buf); /* make no sprint() return code assumptions */ break; default: printf("internal error: invalid pattern type (%d)\n", pat->type); @@ -316,7 +317,8 @@ char *match_url(char *filename, URLGlob glob) { *buf++ = pat.content.CharRange.ptr_c; break; case UPTNumRange: - buf += sprintf(buf, "%0*d", pat.content.NumRange.padlength, pat.content.NumRange.ptr_n); + sprintf(buf, "%0*d", pat.content.NumRange.padlength, pat.content.NumRange.ptr_n); + buf += strlen(buf); break; default: printf("internal error: invalid pattern type (%d)\n", pat.type); |