1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -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; *buf++ = pat->content.CharRange.ptr_c;
break; break;
case UPTNumRange: 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; break;
default: default:
printf("internal error: invalid pattern type (%d)\n", pat->type); 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; *buf++ = pat.content.CharRange.ptr_c;
break; break;
case UPTNumRange: 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; break;
default: default:
printf("internal error: invalid pattern type (%d)\n", pat.type); printf("internal error: invalid pattern type (%d)\n", pat.type);