Skip to content

Commit

Permalink
Fixes off-by-one in BufferWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
psde committed Jan 17, 2013
1 parent 3c40afc commit 019bf79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BufferWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class BufferWriter
{
this->writeBuffer[bufferPosition++] = c;

if(this->bufferPosition > BufferWriter::BUFFER_SIZE)
if(this->bufferPosition >= BufferWriter::BUFFER_SIZE)
this->flush();
}

Expand Down

0 comments on commit 019bf79

Please sign in to comment.