Fixed -Werror=sign-compare.

This commit is contained in:
Patrick 2023-06-25 12:31:43 +02:00
parent 920e83d4da
commit fb392a7239

View File

@ -282,7 +282,7 @@ StreamError MemoryStream::seek(std::intptr_t pos, SeekMode seekMode)
newPos = static_cast<std::intptr_t>(data_.size()) + pos;
break;
}
if (newPos < 0 || newPos > data_.size()) {
if (newPos < 0 || newPos > static_cast<std::intptr_t>(data_.size())) {
return StreamError::IO_ERROR;
}
pos_ = newPos;