From e018e1ff1b3abdfb7e4f07975e89e1c10beddbfc Mon Sep 17 00:00:00 2001 From: Quinn Date: Wed, 20 Aug 2025 10:46:37 +0200 Subject: [PATCH] reorder variables in `nbt_nexttag` --- src/dat/nbt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dat/nbt.c b/src/dat/nbt.c index 6e23619..9b6c0c8 100644 --- a/src/dat/nbt.c +++ b/src/dat/nbt.c @@ -10,11 +10,11 @@ #include "../util/intdef.h" const u8 *nbt_nexttag(const u8 *restrict buf) { - const u8 *tag, *ptr, *tmp; - tag = buf; + const u8 *tag, *ptr; uint dpt = 0; - // looping through the named tags + tag = buf; + do { ptr = tag + be16toh(*(u16 *)(tag + 1)) + 3; // set `ptr` to start of data mems = 0;