forked from ground/ground
Bugfix: no longer treats floats as ints
This commit is contained in:
@@ -182,6 +182,7 @@ void error(string in, int exitc = 1) {
|
||||
bool isInt(string in) {
|
||||
try {
|
||||
stoi(in);
|
||||
if (stod(in) != stoi(in)) return false;
|
||||
return true;
|
||||
} catch (...) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user