From fe108176967363acb4daa60e43d1bbc01caabdc1 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 18:53:46 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Items/ItemNaming.cpp Batch #17253 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_06581 ITEM_INFO::DisplayName: logic confirmed by peer review (already on main) - fn_06596 LoadItemNameTables: logic confirmed by peer review Peer-reviewed-by: alisonrag, Toshiro, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Items/ItemNaming.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/Contents/Items/ItemNaming.cpp b/Source/Contents/Items/ItemNaming.cpp index 0de5347d7..4c8931b9f 100644 --- a/Source/Contents/Items/ItemNaming.cpp +++ b/Source/Contents/Items/ItemNaming.cpp @@ -586,13 +586,12 @@ __declspec(noinline) void LoadItemNameTables() { } g_tableStorage.LoadTokens(tokens, itemFiles[index], 2); - char** cursor = tokens.empty() ? nullptr : &tokens[0]; - char** end = cursor + tokens.size(); + std::vector::iterator cursor = tokens.begin(); - while (cursor < end) { + while (cursor < tokens.end()) { ITEM_DESC& desc = EnsureItemDescription(std::atoi(*cursor), g_itemDescriptions); cursor += 2; - if (cursor >= end) { + if (cursor >= tokens.end()) { ShowErrorDialog("item.txt \xbd\xba\xc5\xa9\xb8\xb3\xc6\xae\xb8\xa6 \xc8\xae\xc0\xce\xc7\xd8\xc1\xd6\xbc\xbc\xbf\xe4.", 0); } @@ -603,7 +602,7 @@ __declspec(noinline) void LoadItemNameTables() { } desc.identifiedName = name; cursor += 2; - if (cursor >= end) { + if (cursor >= tokens.end()) { ShowErrorDialog("item.txt \xbd\xba\xc5\xa9\xb8\xb3\xc6\xae\xb8\xa6 \xc8\xae\xc0\xce\xc7\xd8\xc1\xd6\xbc\xbc\xbf\xe4.", 0); } @@ -613,7 +612,7 @@ __declspec(noinline) void LoadItemNameTables() { } ++cursor; - if (cursor >= end) { + if (cursor >= tokens.end()) { ShowErrorDialog("item.txt \xbd\xba\xc5\xa9\xb8\xb3\xc6\xae\xb8\xa6 \xc8\xae\xc0\xce\xc7\xd8\xc1\xd6\xbc\xbc\xbf\xe4.", 0); } @@ -627,7 +626,7 @@ __declspec(noinline) void LoadItemNameTables() { unidentified = *cursor; cursor += 2; desc.unidentifiedName = unidentified; - if (cursor >= end) { + if (cursor >= tokens.end()) { ShowErrorDialog("item.txt \xbd\xba\xc5\xa9\xb8\xb3\xc6\xae\xb8\xa6 \xc8\xae\xc0\xce\xc7\xd8\xc1\xd6\xbc\xbc\xbf\xe4.", 0); }