From 01e049c494942914a3f606d53e91fb200f42b6f1 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 12:00:56 +0000 Subject: [PATCH] Decompile fn_19420 (FindNaviObjectByName) Batch #11948 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_19420 FindNaviObjectByName: logic confirmed by peer review Peer-reviewed-by: KWDev, SapitoSucio, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/NavigationRequest.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Contents/NavigationRequest.cpp b/Source/Contents/NavigationRequest.cpp index f1ea6aa7d..d26eaba62 100644 --- a/Source/Contents/NavigationRequest.cpp +++ b/Source/Contents/NavigationRequest.cpp @@ -13,9 +13,11 @@ // OFFSET: 0x00B8C0B0 // FUNCTION: fn_19420 __declspec(noinline) CNavi_Object* FindNaviObjectByName(const char* name, const std::vector& objects) { - for (CNavi_Object* object : objects) { - if (name && std::string(name) == object->name) { - return object; + for (std::vector::const_iterator it = objects.begin(); it != objects.end(); ++it) { + if (name) { + if ((*it)->name == std::string(name)) { + return *it; + } } } return nullptr;