mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-27 09:54:36 +02:00
fix invalid hex number detection also
This commit is contained in:
@@ -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')))
|
||||
|
Reference in New Issue
Block a user