diff options
| author | jacob1 <jfu614@gmail.com> | 2013-04-10 03:13:13 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-04-10 03:13:13 (GMT) |
| commit | 602cbf07015577efd865289b95e842ad118cf084 (patch) | |
| tree | 74404789739c5dd776b4f2353eb3f4078eac421f /src/cat/TPTScriptInterface.cpp | |
| parent | 0787086c8198d5dcc35fcdbead85be2ed8b3c28d (diff) | |
| download | powder-602cbf07015577efd865289b95e842ad118cf084.zip powder-602cbf07015577efd865289b95e842ad118cf084.tar.gz | |
fix setting negative numbers in the old console (using atoi)
Diffstat (limited to 'src/cat/TPTScriptInterface.cpp')
| -rw-r--r-- | src/cat/TPTScriptInterface.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/cat/TPTScriptInterface.cpp b/src/cat/TPTScriptInterface.cpp index d1a7588..2e824ef 100644 --- a/src/cat/TPTScriptInterface.cpp +++ b/src/cat/TPTScriptInterface.cpp @@ -146,14 +146,7 @@ int TPTScriptInterface::parseNumber(char * stringData) } else { - while(cc = *(stringData++)) - { - currentNumber *= base; - if(cc >= '0' && cc <= '9') - currentNumber += cc - '0'; - else - break; - } + return atoi(stringData); } return currentNumber; } |
