diff --git a/Externals/expr/include/expr.h b/Externals/expr/include/expr.h index c9475e4521..f531f378dd 100644 --- a/Externals/expr/include/expr.h +++ b/Externals/expr/include/expr.h @@ -14,6 +14,7 @@ extern "C" { #include /* for isspace */ #include #include /* for pow */ +#include #include #include #include @@ -288,13 +289,13 @@ static struct expr_var *expr_get_var(struct expr_var_list *vars, const char *s, return v; } -static int to_int(double x) { +static int64_t to_int(double x) { if (isnan(x)) { return 0; } else if (isinf(x) != 0) { - return INT_MAX * isinf(x); + return INT64_MAX * isinf(x); } else { - return (int)x; + return (int64_t)x; } }