Cygwin: dps: Fix a bug that read() could not return -1 on error.

This commit is contained in:
Takashi Yano 2023-09-05 16:59:51 +09:00
parent 2ab2e73c2c
commit 2654a5ba76
1 changed files with 3 additions and 1 deletions

View File

@ -1192,7 +1192,9 @@ fhandler_dev_dsp::_read (void *ptr, size_t& len)
return;
}
audio_in_->read ((char *)ptr, (int&)len);
int res = len;
audio_in_->read ((char *)ptr, res);
len = (size_t)res;
}
void