From 28bbe57e2180472a2fc2c404692ca1916ee7ab39 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 06:29:52 +0000 Subject: [PATCH] Decompile fn_18018 (CTownInfoMgr::GetTownInfo) Batch #15549 by Yommy: 1 byte-identical, 0 confirmed by peer review. - fn_18018 CTownInfoMgr::GetTownInfo: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Contents/TownInfoMgr.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/Contents/TownInfoMgr.cpp b/Source/Contents/TownInfoMgr.cpp index 51fc9944c..60da998e8 100644 --- a/Source/Contents/TownInfoMgr.cpp +++ b/Source/Contents/TownInfoMgr.cpp @@ -140,11 +140,15 @@ TownInfo CTownInfoMgr::GetTownInfo(std::string mapName, unsigned int index) { } std::map>::iterator it = this->m_towns.find(key); - if (it != this->m_towns.end() && index < it->second.size()) { - return it->second[index]; + if (it == this->m_towns.end()) { + return TownInfo(); } - return TownInfo(); + if (index >= it->second.size()) { + return TownInfo(); + } + + return it->second[index]; } // OFFSET: 0x00AE33A0