[ox/mc] Fix false positive buffer overflow check when string is last item in MC buffer

This commit is contained in:
Gary Talent 2020-03-31 20:40:29 -05:00
parent d7b5f51fdc
commit 680881003c

View File

@ -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 {