Fix portability to 64 bit platforms.
printf("%.*s",i,s) expects an int not a ptrdiff_t Thanks to bf1783 (at) googlemail.com for the bug report.
This commit is contained in:
parent
6628ca0a98
commit
8e23f2a641
@ -334,7 +334,7 @@ main(int argc, char *argv[])
|
|||||||
if (dirsep != NULL)
|
if (dirsep != NULL)
|
||||||
snprintf(tempname, sizeof(tempname),
|
snprintf(tempname, sizeof(tempname),
|
||||||
"%.*s/" TEMPLATE,
|
"%.*s/" TEMPLATE,
|
||||||
dirsep - ofilename, ofilename);
|
(int)(dirsep - ofilename), ofilename);
|
||||||
else
|
else
|
||||||
strlcpy(tempname, TEMPLATE, sizeof(tempname));
|
strlcpy(tempname, TEMPLATE, sizeof(tempname));
|
||||||
ofd = mkstemp(tempname);
|
ofd = mkstemp(tempname);
|
||||||
|
Loading…
Reference in New Issue
Block a user