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

Fixed a bug reporting write success in FileOutputStream

This commit is contained in:
Tom Poole 2019-07-22 14:41:11 +01:00
parent 2945fc1295
commit 5f21cf214c

View file

@ -79,6 +79,9 @@ bool FileOutputStream::write (const void* const src, const size_t numBytes)
{
jassert (src != nullptr && ((ssize_t) numBytes) >= 0);
if (! openedOk())
return false;
if (bytesInBuffer + numBytes < bufferSize)
{
memcpy (buffer + bytesInBuffer, src, numBytes);