From 14860284daaa16cf6b30a7ed8da9a803e3355c0b Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Thu, 16 Jan 2025 08:48:48 +0000 Subject: [PATCH] fix(lib): windows PE format detection offset being a u32 --- toolchainlib/src/platform/detection/executable.luau | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchainlib/src/platform/detection/executable.luau b/toolchainlib/src/platform/detection/executable.luau index 0f41d99..fad0ae8 100644 --- a/toolchainlib/src/platform/detection/executable.luau +++ b/toolchainlib/src/platform/detection/executable.luau @@ -21,7 +21,7 @@ return function(binaryContents: buffer): ExecutableDetectionResult? if buffer.readstring(binaryContents, 0, 2) == DOS_HEADER then -- File was a DOS executable, jump to PE header to get the magic offset - local signatureOffset = buffer.readu8(binaryContents, PE_HEADER_OFFSET) + local signatureOffset = buffer.readu32(binaryContents, PE_HEADER_OFFSET) -- Check if the value at the magic offset was the PE magic signature if buffer.readstring(binaryContents, signatureOffset, 4) == PE_MAGIC_SIGNATURE then