mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:23:53 +00:00
Merge branch 'unsignedscript' into 'master'
Prevent input type assertion See merge request OpenMW/openmw!3708
This commit is contained in:
commit
cf2c6a99a0
1 changed files with 7 additions and 2 deletions
|
@ -70,7 +70,11 @@ namespace Compiler
|
||||||
&& mData[3] == 0;
|
&& mData[3] == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isDigit() const { return std::isdigit(mData[0]) && mData[1] == 0 && mData[2] == 0 && mData[3] == 0; }
|
bool isDigit() const
|
||||||
|
{
|
||||||
|
return std::isdigit(static_cast<unsigned char>(mData[0])) && mData[1] == 0 && mData[2] == 0
|
||||||
|
&& mData[3] == 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool isMinusSign() const
|
bool isMinusSign() const
|
||||||
{
|
{
|
||||||
|
@ -85,7 +89,8 @@ namespace Compiler
|
||||||
if (isMinusSign())
|
if (isMinusSign())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return std::isalpha(mData[0]) || mData[1] != 0 || mData[2] != 0 || mData[3] != 0;
|
return std::isalpha(static_cast<unsigned char>(mData[0])) || mData[1] != 0 || mData[2] != 0
|
||||||
|
|| mData[3] != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void appendTo(std::string& str) const
|
void appendTo(std::string& str) const
|
||||||
|
|
Loading…
Reference in a new issue