mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 07:35:45 +01:00
simplify the ptr increment a bit, so it's more clear what's going on
This commit is contained in:
@@ -54,8 +54,9 @@ const u8 *nbt_nexttag(const u8 *restrict buf) {
|
|||||||
|
|
||||||
// TODO: move this into it's own function for readability.
|
// TODO: move this into it's own function for readability.
|
||||||
case NBT_LIST: {
|
case NBT_LIST: {
|
||||||
tag = ptr; // temporarily store the tag to cache later
|
tag = ptr;
|
||||||
switch (*(ptr++)) {
|
ptr++;
|
||||||
|
switch (*tag) {
|
||||||
case NBT_END: break;
|
case NBT_END: break;
|
||||||
case NBT_I8: ptr += (i32)be32toh(*(u32 *)ptr) * 1; break;
|
case NBT_I8: ptr += (i32)be32toh(*(u32 *)ptr) * 1; break;
|
||||||
case NBT_I16: ptr += (i32)be32toh(*(u32 *)ptr) * 2; break;
|
case NBT_I16: ptr += (i32)be32toh(*(u32 *)ptr) * 2; break;
|
||||||
|
|||||||
Reference in New Issue
Block a user