mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
binary_io fix
This commit is contained in:
parent
7759a63973
commit
4a9a4ddd14
1 changed files with 3 additions and 3 deletions
|
|
@ -101,7 +101,7 @@ ubyte BinaryReader::get() {
|
|||
}
|
||||
|
||||
int16_t BinaryReader::getInt16() {
|
||||
if (pos+2 >= size) {
|
||||
if (pos+2 > size) {
|
||||
throw std::underflow_error("unexpected end");
|
||||
}
|
||||
pos += 2;
|
||||
|
|
@ -110,7 +110,7 @@ int16_t BinaryReader::getInt16() {
|
|||
}
|
||||
|
||||
int32_t BinaryReader::getInt32() {
|
||||
if (pos+4 >= size) {
|
||||
if (pos+4 > size) {
|
||||
throw std::underflow_error("unexpected end");
|
||||
}
|
||||
pos += 4;
|
||||
|
|
@ -121,7 +121,7 @@ int32_t BinaryReader::getInt32() {
|
|||
}
|
||||
|
||||
int64_t BinaryReader::getInt64() {
|
||||
if (pos+8 >= size) {
|
||||
if (pos+8 > size) {
|
||||
throw std::underflow_error("unexpected end");
|
||||
}
|
||||
pos += 8;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue