Fix off by one error in buffer length check.
This commit is contained in:
parent
a00cefb7e4
commit
53cb7cecc5
|
@ -1754,7 +1754,7 @@ static DWORD CALLBACK widRecorder(LPVOID pmt)
|
|||
{
|
||||
info.fragments --;
|
||||
|
||||
if (lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded > wwi->dwFragmentSize)
|
||||
if (lpWaveHdr->dwBufferLength - lpWaveHdr->dwBytesRecorded >= wwi->dwFragmentSize)
|
||||
{
|
||||
/* directly read fragment in wavehdr */
|
||||
bytesRead = read(wwi->unixdev,
|
||||
|
|
Loading…
Reference in New Issue