@ -91,7 +91,7 @@ int rd_RingbufferSpaceLen(rd_ringbuf_t *rb)
iRet = ri - wi;
}
if (iRet > 0)
if (iRet >= 0)
{
return iRet;