From 24f9ba047ea446b948f1c9421575ea8470911c5b Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Aug 2025 18:29:46 +0200 Subject: [PATCH] fix: not handling END tags in a list --- src/dat/nbt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dat/nbt.c b/src/dat/nbt.c index 75ea1cd..f4e5fc6 100644 --- a/src/dat/nbt.c +++ b/src/dat/nbt.c @@ -56,6 +56,7 @@ const u8 *nbt_nexttag(const u8 *restrict buf) { case NBT_LIST: { tag = ptr; // temporarily store the tag to cache later switch (*(ptr++)) { + case NBT_END: break; case NBT_I8: ptr += 1 * (i32)be32toh(*(u32 *)ptr); break; case NBT_I16: ptr += 2 * (i32)be32toh(*(u32 *)ptr); break; case NBT_I32: // fall through