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:
anders_k 2014-05-18 14:41:45 +00:00
parent cdf941fe51
commit da5a85d147

View file

@ -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)