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) {
|
bool isInt(string in) {
|
||||||
try {
|
try {
|
||||||
stoi(in);
|
stoi(in);
|
||||||
|
if (stod(in) != stoi(in)) return false;
|
||||||
return true;
|
return true;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user