From 2196c71a33c1beb9afa8fbeb8b7f2aeaea258aa8 Mon Sep 17 00:00:00 2001 From: Kirill Batuzov Date: Tue, 25 Feb 2025 14:38:09 +0300 Subject: [PATCH] Preserve the original order of the sections COFF symbol table references sections by their index. We need to present them to the users in the original order, or they won't be able to use symbols from the COFF table correctly. --- pe-parser-library/src/parse.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pe-parser-library/src/parse.cpp b/pe-parser-library/src/parse.cpp index 0a04434..074c83b 100644 --- a/pe-parser-library/src/parse.cpp +++ b/pe-parser-library/src/parse.cpp @@ -956,11 +956,6 @@ bool getSections(bounded_buffer *b, secs.push_back(thisSec); } - std::sort( - secs.begin(), secs.end(), [](const section &lhs, const section &rhs) { - return lhs.sec.PointerToRawData < rhs.sec.PointerToRawData; - }); - return true; }