From 337d36ee5f1f8376f3dcc863270bbe92fd7f8ca7 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 25 Mar 2025 20:34:13 +0100 Subject: 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 --- dev/LibCompiler/src/DynamicLinkerPEF.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dev/LibCompiler/src/DynamicLinkerPEF.cc') 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(); -- cgit v1.2.3