mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2024-11-20 11:49:17 +01:00
Some more small changes to handle files > 2GB on 32bit platforms.
This commit is contained in:
parent
23df30d7be
commit
0d73445e28
@ -22,7 +22,7 @@
|
||||
|
||||
size_t writeMemoryCallback(char *ptr, size_t size, size_t nmemb, void *userp) {
|
||||
std::ostringstream *stream = (std::ostringstream*)userp;
|
||||
size_t count = size * nmemb;
|
||||
std::streamsize count = (std::streamsize) size * nmemb;
|
||||
stream->write(ptr, count);
|
||||
return count;
|
||||
}
|
||||
|
@ -1804,9 +1804,9 @@ int Downloader::progressCallback(void *clientp, double dltotal, double dlnow, do
|
||||
{
|
||||
downloader->TimeAndSize.pop_front();
|
||||
time_t time_first = downloader->TimeAndSize.front().first;
|
||||
size_t size_first = downloader->TimeAndSize.front().second;
|
||||
uintmax_t size_first = downloader->TimeAndSize.front().second;
|
||||
time_t time_last = downloader->TimeAndSize.back().first;
|
||||
size_t size_last = downloader->TimeAndSize.back().second;
|
||||
uintmax_t size_last = downloader->TimeAndSize.back().second;
|
||||
rate = (size_last - size_first) / static_cast<double>((time_last - time_first));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user