1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Made an assertion in MemoryOutputStream::write() slightly more forgiving

This commit is contained in:
jules 2018-09-06 22:00:59 +01:00
parent 6f5b15e345
commit dca741a01d

View file

@ -101,11 +101,11 @@ char* MemoryOutputStream::prepareToWrite (size_t numBytes)
bool MemoryOutputStream::write (const void* const buffer, size_t howMany)
{
jassert (buffer != nullptr);
if (howMany == 0)
return true;
jassert (buffer != nullptr);
if (auto* dest = prepareToWrite (howMany))
{
memcpy (dest, buffer, howMany);