diff --git a/Source/exehead/util.c b/Source/exehead/util.c index 5f13d19a..1aa46f79 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -507,7 +507,7 @@ HRESULT NSISCALL UTF16LEBOM(HANDLE h, INT_PTR ForWrite) if (0 == orgpos) { BYTE bom[2]; - if (myReadFile(h, bom, 2) && (0xff == bom[0] && 0xfe == bom[1])) + if (myReadFile(h, bom, 2) && (0xfeff == *(UINT16*) &bom[0])) { return S_OK; }