Skip to content

Commit

Permalink
Fixed a bug reporting write success in FileOutputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoole committed Jul 22, 2019
1 parent 2945fc1 commit 5f21cf2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/juce_core/files/juce_FileOutputStream.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 5f21cf2

Please sign in to comment.