diff --git a/src/io/dataBuffer.h b/src/io/dataBuffer.h index 6caa4fc..9e4c647 100644 --- a/src/io/dataBuffer.h +++ b/src/io/dataBuffer.h @@ -186,6 +186,7 @@ class DataBuffer { uint32_t len = 0; read(len); + if (len == 0) { s.clear(); return; } if (read_index + len > buffer.size()) return; s.assign(reinterpret_cast(&buffer[read_index]), len); read_index += len;