lib/nbt: Fix a bug caused by having two return statements swapped
parent
b53999a548
commit
833c09e2da
|
@ -776,10 +776,10 @@ namespace NBT {
|
||||||
|
|
||||||
ErrorOr<int8_t> Int8Array::getValue(uint64_t position) {
|
ErrorOr<int8_t> Int8Array::getValue(uint64_t position) {
|
||||||
if (this->data.size() <= position) {
|
if (this->data.size() <= position) {
|
||||||
return ErrorOr<int8_t>(this->data.at(position));
|
return ErrorOr<int8_t>(true, ErrorCodes::OUT_OF_RANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ErrorOr<int8_t>(true, ErrorCodes::OUT_OF_RANGE);
|
return ErrorOr<int8_t>(this->data.at(position));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Int8Array::setData(std::vector<int8_t> newData) {
|
void Int8Array::setData(std::vector<int8_t> newData) {
|
||||||
|
|
Loading…
Reference in New Issue