Better UTF8_GetTrailCount handling of start bytes outside the RFC 3629 range
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6483 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
cdf941fe51
commit
da5a85d147
1 changed files with 3 additions and 2 deletions
|
@ -65,12 +65,13 @@ inline bool UTF8_GetTrailCount(unsigned char chFirst, unsigned char &cb)
|
|||
if (0xF8 == (0xF8 & chFirst))
|
||||
{
|
||||
++cb;
|
||||
if (0xFC == (0xFE & chFirst)) ++cb; else return false;
|
||||
if (0xFC == (0xFE & chFirst)) ++cb; else return 0xFC >= (0xFE & chFirst);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return (signed char)chFirst >= 0;
|
||||
}
|
||||
|
||||
inline UINT InlineStrLenUTF16(const void*str)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue