mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-03 04:52:35 +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
|
else
|
||||||
{
|
{
|
||||||
while(cc = *(stringData++))
|
return atoi(stringData);
|
||||||
{
|
|
||||||
currentNumber *= base;
|
|
||||||
if(cc >= '0' && cc <= '9')
|
|
||||||
currentNumber += cc - '0';
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return currentNumber;
|
return currentNumber;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user