From f0242fb7d56b196216ffa59262b5ad6809cfda7e 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 8c1ce6bcb..b3e97ef99 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: