--- parser3/src/classes/math.C 2023/11/16 01:17:51 1.102 +++ parser3/src/classes/math.C 2023/11/16 23:54:54 1.103 @@ -23,7 +23,7 @@ extern "C" char *crypt(const char* , const char* ); #endif -volatile const char * IDENT_MATH_C="$Id: math.C,v 1.102 2023/11/16 01:17:51 moko Exp $"; +volatile const char * IDENT_MATH_C="$Id: math.C,v 1.103 2023/11/16 23:54:54 moko Exp $"; // defines @@ -47,8 +47,8 @@ DECLARE_CLASS_VAR(math, new MMath); static void _random(Request& r, MethodParams& params) { double top=params.as_double(0, "range must be expression", r); - if(top<1 || top>INT32_MAX) - throw Exception(PARSER_RUNTIME, 0, "top(%.15g) must be [1..%u]", top, INT32_MAX); + if(top<1 || top>INT_MAX) + throw Exception(PARSER_RUNTIME, 0, "top(%.15g) must be [1..%u]", top, INT_MAX); r.write(*new VInt(_random(uint(top)))); }