From c15046e01743c1d39c04650dcdf3039556f86cca Mon Sep 17 00:00:00 2001 From: Quinn Date: Tue, 19 Aug 2025 11:14:14 +0200 Subject: [PATCH] small fix with nbt_proctag, and remove usage of `nbt_primsize` --- src/dat/nbt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dat/nbt.c b/src/dat/nbt.c index 4a16e03..d16cb22 100644 --- a/src/dat/nbt.c +++ b/src/dat/nbt.c @@ -68,7 +68,7 @@ static const u8 *nbt_proctag(const u8 *restrict buf, u16 slen) { switch (*buf) { // integral types - case NBT_I8: *dat = *ptr; return ptr; + case NBT_I8: *dat = *ptr; return ptr + 1; case NBT_I16: *(u16 *)dat = be16toh(*(u16 *)ptr); return ptr + 2; case NBT_I32: // fall through case NBT_F32: *(u32 *)dat = be16toh(*(u32 *)ptr); return ptr + 4; @@ -87,7 +87,7 @@ static const u8 *nbt_proctag(const u8 *restrict buf, u16 slen) { default: return NULL; } if (!arrlen) return NULL; - return ptr + nbt_primsize(*buf); + return ptr; // TODO: return end of array } struct nbt_procdat nbt_initproc(struct nbt_path const *restrict pats, uint npats) {