fix: the + unary operator does not add 1, but just specifies intent.

I was very mistaken, and I feel like an idiot.
This commit is contained in:
2025-08-07 09:57:17 +02:00
parent 4b2404e903
commit f952268152

View File

@@ -48,7 +48,7 @@ size_t nbt_tagdatlen(const u8 *restrict buf) {
case NBT_ARR_I64: mems += sizeof(i64) - sizeof(i32); __attribute__((fallthrough));
case NBT_ARR_I32: mems += sizeof(i32) - sizeof(i8); __attribute__((fallthrough));
case NBT_ARR_I8: return +mems * (i32)be32toh(*(u32 *)(buf)) + 4;
case NBT_ARR_I8: return ++mems * (i32)be32toh(*(u32 *)(buf)) + 4;
case NBT_STR: return be16toh(*(u16 *)buf) + 2;