[ox/mc] Fix false positive buffer overflow check when string is last item in MC buffer
This commit is contained in:
parent
d7b5f51fdc
commit
680881003c
2
deps/ox/src/ox/mc/read.cpp
vendored
2
deps/ox/src/ox/mc/read.cpp
vendored
@ -79,7 +79,7 @@ Error MetalClawReader::field(const char*, SerStr val) {
|
||||
|
||||
// read the string
|
||||
if (val.cap() > -1 && static_cast<StringLength>(val.cap()) >= size) {
|
||||
if (m_buffIt + size < m_buffLen) {
|
||||
if (m_buffIt + size <= m_buffLen) {
|
||||
ox_memcpy(val.data(), &m_buff[m_buffIt], size);
|
||||
m_buffIt += size;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user