TPTScript: Allow numbers with decimal point

This commit is contained in:
Simon Robertshaw 2012-08-19 12:50:04 +01:00
parent 4c63a6f593
commit 7d8c6c7f86

View File

@ -85,7 +85,7 @@ ValueType TPTScriptInterface::testType(std::string word)
//Basic type
parseNumber:
for(i = 0; i < word.length(); i++)
if(!(rawWord[i] >= '0' && rawWord[i] <= '9'))
if(!(rawWord[i] >= '0' && rawWord[i] <= '9') && rawWord[i] != '.')
{
if(rawWord[i] == ',' && rawWord[i+1] >= '0' && rawWord[i+1] <= '9')
goto parsePoint;