From 4e2f4c03ecc7a2c5326f1cc181e56af12d41713d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 01:05:47 +0000 Subject: [PATCH] Decompile 2 functions in Source/File/FileEnumeration.cpp Batch #17593 by eAthena: 2 byte-identical, 0 confirmed by peer review. - fn_18246 EnumerateFileNames: byte-identical - fn_18247 EnumerateFileNames: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/File/FileEnumeration.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Source/File/FileEnumeration.cpp b/Source/File/FileEnumeration.cpp index 5962c9d49..eaee8d64c 100644 --- a/Source/File/FileEnumeration.cpp +++ b/Source/File/FileEnumeration.cpp @@ -16,11 +16,15 @@ void EnumerateFileNames(std::list& names, const char* directory, co const std::string current("."); const std::string parent(".."); - do { + if (current != found.cFileName && parent != found.cFileName) { + names.push_back(std::string(found.cFileName)); + } + + while (FindNextFileA(handle, &found)) { if (current != found.cFileName && parent != found.cFileName) { names.push_back(std::string(found.cFileName)); } - } while (FindNextFileA(handle, &found)); + } FindClose(handle); } @@ -38,10 +42,14 @@ void EnumerateFileNames(std::vector& names, const char* directory, const std::string current("."); const std::string parent(".."); - do { + if (current != found.cFileName && parent != found.cFileName) { + names.push_back(std::string(found.cFileName)); + } + + while (FindNextFileA(handle, &found)) { if (current != found.cFileName && parent != found.cFileName) { names.push_back(std::string(found.cFileName)); } - } while (FindNextFileA(handle, &found)); + } FindClose(handle); }