diff --git a/src/lib/nbt.cpp b/src/lib/nbt.cpp index d33e25c..1684093 100644 --- a/src/lib/nbt.cpp +++ b/src/lib/nbt.cpp @@ -776,10 +776,10 @@ namespace NBT { ErrorOr Int8Array::getValue(uint64_t position) { if (this->data.size() <= position) { - return ErrorOr(this->data.at(position)); + return ErrorOr(true, ErrorCodes::OUT_OF_RANGE); } - return ErrorOr(true, ErrorCodes::OUT_OF_RANGE); + return ErrorOr(this->data.at(position)); } void Int8Array::setData(std::vector newData) {