parent
8e9e8c04cd
commit
27216901d4
|
@ -232,8 +232,9 @@ const TCHAR* TiXmlBase::GetEntity( const TCHAR* p, TCHAR* value )
|
||||||
const TCHAR* end = generic_strchr(p+3, TEXT(';'));
|
const TCHAR* end = generic_strchr(p+3, TEXT(';'));
|
||||||
if (end && end - p <= 3 + 4)
|
if (end && end - p <= 3 + 4)
|
||||||
{
|
{
|
||||||
int val;
|
TCHAR* hexend;
|
||||||
if (generic_sscanf(p+3, TEXT("%x"), &val) == 1)
|
auto val = generic_strtol(p + 3, &hexend, 16);
|
||||||
|
if (hexend == end)
|
||||||
{
|
{
|
||||||
*value = static_cast<TCHAR>(val);
|
*value = static_cast<TCHAR>(val);
|
||||||
return end + 1;
|
return end + 1;
|
||||||
|
|
Loading…
Reference in New Issue