lib/nbt: return correct error type from read functions #17

Closed
opened 2022-06-29 10:38:03 +02:00 by BodgeMaster · 1 comment

I added ErrorCodes::OVERRUN_ERROR. Might be useful to know what kind of error occurred.

I added `ErrorCodes::OVERRUN_ERROR`. Might be useful to know what kind of error occurred.
BodgeMaster added this to the NBT milestone 2022-06-29 10:38:03 +02:00
BodgeMaster added the
Enhancement
label 2022-06-29 11:08:23 +02:00
BodgeMaster changed title from Make the NBT::helper::readIntN functions use the correct error code for what happened. to NBT: Make the NBT::helper::readIntN functions use the correct error code for what happened. 2022-07-12 05:25:26 +02:00
BodgeMaster changed title from NBT: Make the NBT::helper::readIntN functions use the correct error code for what happened. to lib/nbt: Make the NBT::helper::readIntN functions use the correct error code for what happened. 2022-07-20 10:12:20 +02:00

Many of them only return OUT_OF_RANGE where they should return either OUT_OF_RANGE or OVERRUN depending on what happened.

  • OUT_OF_RANGE when currentPosition is out of bounds
  • OVERRUN when reading would would go out of bounds
Many of them only return `OUT_OF_RANGE` where they should return either `OUT_OF_RANGE` or `OVERRUN` depending on what happened. - `OUT_OF_RANGE` when `currentPosition` is out of bounds - `OVERRUN` when reading would would go out of bounds
BodgeMaster changed title from lib/nbt: Make the NBT::helper::readIntN functions use the correct error code for what happened. to lib/nbt: return correct error type from read functions 2022-08-04 08:25:09 +02:00
BodgeMaster self-assigned this 2022-08-25 17:04:20 +02:00
Sign in to join this conversation.
There is no content yet.