mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
More efficient preallocation when reading large files into memory.
This commit is contained in:
parent
23d3bfe3e2
commit
2cc283fddd
1 changed files with 1 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ int64 MemoryOutputStream::writeFromInputStream (InputStream& source, int64 maxNu
|
|||
|
||||
if (availableData > 0)
|
||||
{
|
||||
if (maxNumBytesToWrite > availableData)
|
||||
if (maxNumBytesToWrite > availableData || maxNumBytesToWrite < 0)
|
||||
maxNumBytesToWrite = availableData;
|
||||
|
||||
if (blockToUse != nullptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue