From 2bda128ef183c6b1a26a5d8a1586af25114e629f Mon Sep 17 00:00:00 2001 From: acqn Date: Sat, 26 Feb 2022 23:02:51 +0800 Subject: [PATCH] Fixed LimitExprValue() for 64-bit long env. --- src/cc65/expr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cc65/expr.c b/src/cc65/expr.c index 3b9307a37..8920d5c40 100644 --- a/src/cc65/expr.c +++ b/src/cc65/expr.c @@ -216,8 +216,11 @@ void LimitExprValue (ExprDesc* Expr) break; case T_LONG: + Expr->IVal = (int32_t)Expr->IVal; + break; + case T_ULONG: - /* No need to do anything */ + Expr->IVal = (uint32_t)Expr->IVal; break; case T_SCHAR: