1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

Ron Zapp <rzapper@yahoo.com> corrected a sprintf() problem

This commit is contained in:
Daniel Stenberg 2000-02-08 00:27:21 +00:00
parent bc375152b1
commit bcc8f8f11a

View File

@ -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);