Save a couple of bytes by comparing the UTF16LE BOM as a 16-bit number
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6920 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9764f37904
commit
09134d125e
1 changed files with 1 additions and 1 deletions
|
@ -507,7 +507,7 @@ HRESULT NSISCALL UTF16LEBOM(HANDLE h, INT_PTR ForWrite)
|
||||||
if (0 == orgpos)
|
if (0 == orgpos)
|
||||||
{
|
{
|
||||||
BYTE bom[2];
|
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;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue