ftplibpp icon indicating copy to clipboard operation
ftplibpp copied to clipboard

The function ftplib::sprint_rest() is wrong

Open Fojtik opened this issue 5 years ago • 0 comments

Why do you think that only APPLE handles 64 bit variables?

Proese use this fix: void ftplib::sprint_rest(char *buf, off64_t offset) { #if sizeof(offset)>4 sprintf(buf,"REST %lld",offset); #else sprintf(buf,"REST %ld",offset); #endif }

or if you are paranoid enougs and absolutelly sure that thare does not exist 32 bit code on APPLE: void ftplib::sprint_rest(char *buf, off64_t offset) { #if defined(APPLE) || sizeof(offset)>4 sprintf(buf,"REST %lld",offset); #else sprintf(buf,"REST %ld",offset); #endif }

Fojtik avatar Apr 29 '19 17:04 Fojtik