Skip to content

Commit

Permalink
fix invalid hex number detection also
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Aug 9, 2014
1 parent e388a4b commit fd550be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lua/TPTScriptInterface.cpp
Expand Up @@ -90,7 +90,7 @@ ValueType TPTScriptInterface::testType(std::string word)
goto parseFloat;
else if (rawWord[i] == ',' && rawWord[i+1] >= '0' && rawWord[i+1] <= '9')
goto parsePoint;
else if ((rawWord[i] == '#' || rawWord[i] == 'x') &&
else if ((rawWord[i] == '#' || (i && rawWord[i-1] == '0' && rawWord[i] == 'x')) &&
((rawWord[i+1] >= '0' && rawWord[i+1] <= '9')
|| (rawWord[i+1] >= 'a' && rawWord[i+1] <= 'f')
|| (rawWord[i+1] >= 'A' && rawWord[i+1] <= 'F')))
Expand Down

0 comments on commit fd550be

Please sign in to comment.