From a7f0cd575c4cc267ff14ac433175c68f96c16e87 Mon Sep 17 00:00:00 2001 From: Alexandre Mutel Date: Wed, 2 Oct 2024 21:57:56 +0200 Subject: [PATCH] Fix issue with shadow section of size = 1 --- src/LibObjectFile/Elf/ElfFilePartList.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LibObjectFile/Elf/ElfFilePartList.cs b/src/LibObjectFile/Elf/ElfFilePartList.cs index 25dc1ff..cf0c120 100644 --- a/src/LibObjectFile/Elf/ElfFilePartList.cs +++ b/src/LibObjectFile/Elf/ElfFilePartList.cs @@ -1,4 +1,4 @@ -// Copyright (c) Alexandre Mutel. All rights reserved. +// Copyright (c) Alexandre Mutel. All rights reserved. // This file is licensed under the BSD-Clause 2 license. // See the license.txt file in the project root for more information. @@ -53,7 +53,7 @@ public void Insert(ElfFilePart part) public void CreateParts(ulong startOffset, ulong endOffset) { var offset = startOffset; - for (int i = 0; i < _parts.Count && offset < endOffset; i++) + for (int i = 0; i < _parts.Count && offset <= endOffset; i++) { var part = _parts[i]; if (offset < part.StartOffset)