fix: not handling END tags in a list

This commit is contained in:
2025-08-20 18:29:46 +02:00
parent e67d8c7fd4
commit 24f9ba047e

View File

@@ -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