diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-09 04:46:56 -0500 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-09 04:46:56 -0500 |
| commit | a358a3caaee2a4781f910cfb440bd822ae73a7e5 (patch) | |
| tree | 638ff44db51c8e27826e56bacb5af764f98ef2d0 /Minecraft.World/ByteArrayInputStream.cpp | |
| parent | d557ca2dfba5ffcca99ceb41b07d149f871964b5 (diff) | |
Revert accidentally pushed "LCEMP RCE fixes"
This reverts commit d557ca2dfba5ffcca99ceb41b07d149f871964b5.
Diffstat (limited to 'Minecraft.World/ByteArrayInputStream.cpp')
| -rw-r--r-- | Minecraft.World/ByteArrayInputStream.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/Minecraft.World/ByteArrayInputStream.cpp b/Minecraft.World/ByteArrayInputStream.cpp index 9509206d..d79eff36 100644 --- a/Minecraft.World/ByteArrayInputStream.cpp +++ b/Minecraft.World/ByteArrayInputStream.cpp @@ -10,19 +10,8 @@ //offset - the offset in the buffer of the first byte to read. //length - the maximum number of bytes to read from the buffer. ByteArrayInputStream::ByteArrayInputStream(byteArray buf, unsigned int offset, unsigned int length) - : pos(offset), mark(offset) + : pos( offset ), count( min( offset+length, buf.length ) ), mark( offset ) { - if (offset > buf.length) - { - count = buf.length; - } - else if (length > buf.length - offset) - { - count = buf.length; - } - else - { - count = offset + length; this->buf = buf; } |
