pull/49/head
Marcin Kondej 2016-12-13 02:49:36 +01:00
rodzic 6ea4391278
commit 0ab9e9d586
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -170,8 +170,8 @@ vector<char>* WaveReader::readData(unsigned bytesToRead, bool &forceStop)
oss << "Error while reading " << getFilename() << ", file is corrupted"; oss << "Error while reading " << getFilename() << ", file is corrupted";
throw ErrorReporter(oss.str()); throw ErrorReporter(oss.str());
} }
if ((bytes == 0) && (fileDescriptor != STDIN_FILENO)) { if ((bytes < bytesToRead - bytesRead) && (fileDescriptor != STDIN_FILENO)) {
data->resize(bytesRead); data->resize(bytes);
break; break;
} }
if (bytes > 0) { if (bytes > 0) {