From f1ed5b7057d101a2297d207cb8c868719c197b06 Mon Sep 17 00:00:00 2001 From: Kugel Fuhr <98353208+kugelfuhr@users.noreply.github.com> Date: Mon, 7 Apr 2025 09:20:51 +0200 Subject: [PATCH] Fixed a typo in g_typeadjust(). Will fix #2611. --- src/cc65/codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc65/codegen.c b/src/cc65/codegen.c index 166176f5e..e55a318d6 100644 --- a/src/cc65/codegen.c +++ b/src/cc65/codegen.c @@ -1489,7 +1489,7 @@ unsigned g_typeadjust (unsigned lhs, unsigned rhs) ** both operands are converted to unsigned long int. */ if ((ltype == CF_LONG && rtype == CF_INT && (rhs & CF_UNSIGNED)) || - (rtype == CF_LONG && ltype == CF_INT && (rhs & CF_UNSIGNED))) { + (rtype == CF_LONG && ltype == CF_INT && (lhs & CF_UNSIGNED))) { /* long can represent all unsigneds, so we are in the first sub-case. */ return const_flag | CF_LONG; }