mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-31 19:51:45 +02:00
fix setting negative numbers in the old console (using atoi)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user