lexer: Be consistent across 32/64 bit in lex_force_int_range().
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 6 Dec 2021 17:02:30 +0000 (09:02 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 6 Dec 2021 17:03:45 +0000 (09:03 -0800)
commit85d0c8ab00924b1e6d52da4f0dcbd1b37c77da9d
tree8aa972c02b3db818bd21131730a6f767d74e2032
parentb883ba798e5894de1bc246fe729c9a2fdb463d01
lexer: Be consistent across 32/64 bit in lex_force_int_range().

The exact error message that this function reported varied between 32-
and 64-bit platforms for invalid integers that require more than 32 bits
but no more than 64 bits, since "long int" has a different range between
those platforms.  This commit fixes the problem.

This issue caused the test "testing lexer crash due to overflow" to fail
on 32-bit platforms.

Thanks to Friedrich Beckmann for reporting the problem.
src/language/lexer/lexer.c