Remove invalid assertion from SimExternalConnection::read

This commit is contained in:
sfc-gh-tclinkenbeard 2020-12-24 17:53:46 -04:00
parent a7202a5b42
commit 0b45c969b9
1 changed files with 1 additions and 2 deletions

View File

@ -84,8 +84,7 @@ Future<Void> SimExternalConnection::onReadable() {
}
int SimExternalConnection::read(uint8_t* begin, uint8_t* end) {
size_t toRead = end - begin;
ASSERT(toRead <= readBuffer.size());
auto toRead = std::min<int>(end - begin, readBuffer.size());
// TODO: Improve performance
for (int i = 0; i < toRead; ++i) {
*(begin + i) = readBuffer.front();