Skip to content

Commit e6742fe

Browse files
committed
Fix missed AlignToBoundary case
1 parent b656171 commit e6742fe

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

SabreTools.Serialization/Deserializers/PortableExecutable.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,7 @@ public static BaseRelocationBlock[] ParseBaseRelocationTable(Stream data, int en
329329
baseRelocationTable.Add(baseRelocationBlock);
330330

331331
// Align to the DWORD boundary if we're not at the end
332-
if (data.Position < data.Length)
333-
{
334-
while (data.Position < data.Length && (data.Position % 4) != 0)
335-
_ = data.ReadByte();
336-
}
332+
data.AlignToBoundary(4);
337333
}
338334

339335
return [.. baseRelocationTable];

0 commit comments

Comments
 (0)