Remove invalid assertion from SimExternalConnection::read
This commit is contained in:
parent
a7202a5b42
commit
0b45c969b9
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue