Fix implicit signedness conversion
This commit is contained in:
parent
f95e16bc80
commit
d8a70bb795
|
@ -159,7 +159,7 @@ string BinaryReader::readTerminatedString(std::size_t maxBytesToRead, std::uint8
|
|||
for (char *i = buff.get(), *end = i + maxBytesToRead; i < end; ++i) {
|
||||
m_stream->get(*i);
|
||||
if (*(reinterpret_cast<std::uint8_t *>(i)) == termination) {
|
||||
return string(buff.get(), i - buff.get());
|
||||
return string(buff.get(), static_cast<size_t>(i - buff.get()));
|
||||
}
|
||||
}
|
||||
return string(buff.get(), maxBytesToRead);
|
||||
|
|
Loading…
Reference in New Issue