ftplibpp
ftplibpp copied to clipboard
The function ftplib::sprint_rest() is wrong
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 }