mirror of
https://github.com/ziglang/zig.git
synced 2024-11-16 09:03:12 +00:00
windows: Map EXE_MACHINE_TYPE_MISMATCH to InvalidExe
Seems to happen if the command trying to be executed has the extension .exe and it's an invalid executable.
This commit is contained in:
parent
6e22b63edb
commit
3ee8c49582
@ -1624,6 +1624,9 @@ pub fn CreateProcessW(
|
||||
.RING2SEG_MUST_BE_MOVABLE,
|
||||
.RELOC_CHAIN_XEEDS_SEGLIM,
|
||||
.INFLOOP_IN_RELOC_CHAIN, // MAX_EXEC_ERROR in errno.cpp
|
||||
// This one is not mapped to ENOEXEC but it is possible, for example
|
||||
// when calling CreateProcessW on a plain text file with a .exe extension
|
||||
.EXE_MACHINE_TYPE_MISMATCH,
|
||||
=> return error.InvalidExe,
|
||||
else => |err| return unexpectedError(err),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user