Skip to content

Commit

Permalink
Merge pull request #1 from armatusmiles/master
Browse files Browse the repository at this point in the history
Fix runtime error during push zero size data to buffer with dataSize equals 0
  • Loading branch information
Roen-Ro authored Jan 26, 2019
2 parents b305081 + 217ac60 commit d968a2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CircularBuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ size_t CircularBufferGetDataSize(CircularBuffer cBuf)

void CircularBufferPush(CircularBuffer cBuf,void *src, size_t length)
{
if(length == 0)
return;

size_t writableLen = length;
void *pSrc = src;

Expand Down

0 comments on commit d968a2d

Please sign in to comment.