summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-11-27 06:59:02 +0000
committerSteve Holme <steve_holme@hotmail.com>2015-11-27 06:59:02 +0000
commitdb05d7a731109a2a5234168973783499d300fdb8 (patch)
tree4f0a26b30fc653be2b0b2b3fd3b270da69cc2a4f
parentcd2b73b3ed9d971eca87ee5c6245cc1cc6f83d06 (diff)
downloadgnurl-db05d7a731109a2a5234168973783499d300fdb8.tar.gz
gnurl-db05d7a731109a2a5234168973783499d300fdb8.tar.bz2
gnurl-db05d7a731109a2a5234168973783499d300fdb8.zip
tool_paramhlp: Fixed display of URL index in password prompt for --next
Commit f3bae6ed73 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.
-rw-r--r--src/tool_paramhlp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index c26754aeb..c1baed5f0 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -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));