Implemented a minimum length for sections
All checks were successful
/ test (push) Successful in 20s

This commit is contained in:
Eduard Urbach 2025-07-05 20:39:44 +02:00
parent 8886e90e21
commit 186c12145c
Signed by: akyoto
GPG key ID: 49226B848C78F6C8

View file

@ -19,8 +19,12 @@ func New(headerEnd int, fileAlign int, memoryAlign int, congruent bool, raw ...[
congruent: congruent, congruent: congruent,
} }
for i, data := range raw { for i, section := range raw {
exe.Sections[i] = &Section{Bytes: data} if len(section) == 0 {
section = []byte{0}
}
exe.Sections[i] = &Section{Bytes: section}
} }
exe.Update() exe.Update()