diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-01 11:14:47 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-01 11:14:47 (GMT) |
| commit | d78082d368ccb945e90594f2178202f2c499c484 (patch) | |
| tree | d31ba88424ed19fdc72231fd91b966a1ce813cc8 /src/cat/TPTScriptInterface.cpp | |
| parent | 7568e082dd2e53c6acfe6cf569fc2f8d97c9b734 (diff) | |
| download | powder-d78082d368ccb945e90594f2178202f2c499c484.zip powder-d78082d368ccb945e90594f2178202f2c499c484.tar.gz | |
Negative values in old console commands
Diffstat (limited to 'src/cat/TPTScriptInterface.cpp')
| -rw-r--r-- | src/cat/TPTScriptInterface.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index ce7128f..9cfba07 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -85,13 +85,15 @@ ValueType TPTScriptInterface::testType(std::string word) //Basic type parseNumber: for(i = 0; i < word.length(); i++) - if(!(rawWord[i] >= '0' && rawWord[i] <= '9') && rawWord[i] != '.') + { + if(!(rawWord[i] >= '0' && rawWord[i] <= '9') && rawWord[i] != '.' && !(rawWord[i] == '-' && !i)) { if(rawWord[i] == ',' && rawWord[i+1] >= '0' && rawWord[i+1] <= '9') goto parsePoint; else goto parseString; } + } return TypeNumber; parsePoint: i++; |
