mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed a crash when fetching large content in URL::FallbackDownloadTask
This commit is contained in:
parent
f9dad9d608
commit
5935040d78
1 changed files with 2 additions and 2 deletions
|
|
@ -62,8 +62,8 @@ struct FallbackDownloadTask : public URL::DownloadTask,
|
|||
if (listener != nullptr)
|
||||
listener->progress (this, downloaded, contentLength);
|
||||
|
||||
auto max = jmin ((int) bufferSize, contentLength < 0 ? std::numeric_limits<int>::max()
|
||||
: static_cast<int> (contentLength - downloaded));
|
||||
auto max = (int) jmin ((int64) bufferSize, contentLength < 0 ? std::numeric_limits<int64>::max()
|
||||
: static_cast<int64> (contentLength - downloaded));
|
||||
|
||||
auto actual = stream->read (buffer.get(), max);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue