summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src/DynamicLinkerPEF.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-03-25 20:34:13 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-03-25 20:34:13 +0100
commit337d36ee5f1f8376f3dcc863270bbe92fd7f8ca7 (patch)
tree78638ce3ca247f185d94cb4f7612c49d49265af5 /dev/LibCompiler/src/DynamicLinkerPEF.cc
parenta54afb132d4c1e71fc57425a25c68e9ca6053c9b (diff)
fix(linker): A critical fix regarding the output being repetadely
written on the file. refactor(NFC): Rename String.h to StringView.h Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src/DynamicLinkerPEF.cc')
-rw-r--r--dev/LibCompiler/src/DynamicLinkerPEF.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/dev/LibCompiler/src/DynamicLinkerPEF.cc b/dev/LibCompiler/src/DynamicLinkerPEF.cc
index 4a7bb49..924f587 100644
--- a/dev/LibCompiler/src/DynamicLinkerPEF.cc
+++ b/dev/LibCompiler/src/DynamicLinkerPEF.cc
@@ -411,10 +411,9 @@ LIBCOMPILER_MODULE(DynamicLinker64PEF)
reader_protocol.FP.seekg(std::streamsize(ae_header.fStartCode));
reader_protocol.FP.read(bytes.data(), std::streamsize(ae_header.fCodeSize));
- for (auto& byte : bytes)
- {
- kObjectBytes.push_back({.mBlob = bytes, .mOffset = ae_header.fStartCode});
- }
+ kObjectBytes.push_back({.mBlob = bytes, .mOffset = ae_header.fStartCode});
+
+ // Blob was written, close fp.
reader_protocol.FP.close();