zld: dylib paths need nul terminator included

This commit is contained in:
Jakub Konka 2021-05-27 11:00:26 +02:00
parent f750618846
commit ae15281c05

View File

@ -316,7 +316,7 @@ pub fn createLoadDylibCommand(
) !GenericCommandWithData(macho.dylib_command) {
const cmdsize = @intCast(u32, mem.alignForwardGeneric(
u64,
@sizeOf(macho.dylib_command) + name.len,
@sizeOf(macho.dylib_command) + name.len + 1, // +1 for nul
@sizeOf(u64),
));