From d0c08263fc0895db59d29b4c0e23efc2847a78a1 Mon Sep 17 00:00:00 2001 From: daid Date: Wed, 12 Jul 2023 08:37:52 +0200 Subject: [PATCH] Update dataBuffer.h Fix https://github.com/daid/EmptyEpsilon/issues/1999 --- src/io/dataBuffer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/io/dataBuffer.h b/src/io/dataBuffer.h index 6caa4fc3..9e4c6477 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;