Skip to content

Commit

Permalink
tool_paramhlp: Fixed display of URL index in password prompt for --next
Browse files Browse the repository at this point in the history
Commit f3bae6e added the URL index to the password prompt when using
--next. Unfortunately, because the size_t specifier (%zu) is not
supported by all sprintf() implementations we use the curl_off_t format
specifier instead. The display of an incorrect value arises on platforms
where size_t and curl_off_t are of a different size.
  • Loading branch information
captain-caveman2k committed Nov 27, 2015
1 parent cd2b73b commit db05d7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tool_paramhlp.c
Expand Up @@ -426,7 +426,7 @@ static CURLcode checkpasswd(const char *kind, /* for what purpose */
curlx_msnprintf(prompt, sizeof(prompt),
"Enter %s password for user '%s' on URL #%"
CURL_FORMAT_CURL_OFF_TU ":",
kind, *userpwd, i + 1);
kind, *userpwd, (curl_off_t) (i + 1));

/* get password */
getpass_r(prompt, passwd, sizeof(passwd));
Expand Down

0 comments on commit db05d7a

Please sign in to comment.