Fixed incorrect OS detection
This commit is contained in:
@ -31,11 +31,11 @@ func (a Assembler) Finalize(dlls dll.List) ([]byte, []byte) {
|
||||
)
|
||||
|
||||
switch config.TargetOS {
|
||||
case "linux":
|
||||
case config.Linux:
|
||||
headerEnd = elf.HeaderEnd
|
||||
case "macos":
|
||||
case config.Mac:
|
||||
headerEnd = macho.HeaderEnd
|
||||
case "windows":
|
||||
case config.Windows:
|
||||
headerEnd = pe.HeaderEnd
|
||||
}
|
||||
|
||||
@ -443,7 +443,7 @@ restart:
|
||||
binary.LittleEndian.PutUint32(slice, uint32(address))
|
||||
}
|
||||
|
||||
if config.TargetOS == "windows" {
|
||||
if config.TargetOS == config.Windows {
|
||||
if len(data) == 0 {
|
||||
data = []byte{0}
|
||||
}
|
||||
|
Reference in New Issue
Block a user