From 68b88a19f4065dad19da538c6c93c3a1d9d47378 Mon Sep 17 00:00:00 2001 From: jyelon Date: Thu, 19 Feb 2026 00:22:42 -0500 Subject: [PATCH] A few small fixes to the pretty-printer --- luprex/cpp/core/pprint.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/luprex/cpp/core/pprint.cpp b/luprex/cpp/core/pprint.cpp index 09cba149..1c7dd0e7 100644 --- a/luprex/cpp/core/pprint.cpp +++ b/luprex/cpp/core/pprint.cpp @@ -223,19 +223,19 @@ public: if (needcomma) (*output_) << ","; needcomma = true; tabify(level + 1); - if (LS.isstring(key) && sv::is_lua_id(LS.ckstring(key))) { - (*output_) << LS.ckstring(key); - } else if (LS.istoken(key)) { - atomic_print(LUA_TLIGHTUSERDATA, key, false); - } else { - (*output_) << "["; - pprint_r(level + 1, false, key); - (*output_) << "]"; - } - if (indent_) { - (*output_) << " = "; - } else { - (*output_) << "="; + if (!LS.rawequal(key, (i/2))) { + if (LS.isstring(key) && sv::is_lua_id(LS.ckstring(key))) { + (*output_) << LS.ckstring(key); + } else { + (*output_) << "["; + pprint_r(level + 1, false, key); + (*output_) << "]"; + } + if (indent_) { + (*output_) << " = "; + } else { + (*output_) << "="; + } } pprint_r(level + 1, false, val); }