From 4e3989f9bf1468e01cfabf72d7795ac8cbea241e Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Mon, 16 Oct 2023 05:50:06 -0600 Subject: [PATCH 1/2] int to long, to match return value type --- helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper.c b/helper.c index 7e9eb43..fc7ba99 100644 --- a/helper.c +++ b/helper.c @@ -364,7 +364,7 @@ void datatype_decrement_pointer(struct datatype* dtype) long arithmetic(struct compile_process* compiler, long left_operand, long right_operand, const char* op, bool* success) { *success = true; - int result = 0; + long result = 0; if (S_EQ(op, "*")) { result = left_operand * right_operand; From 26c92cf7a78aca198bb8b84e1cdaca3f564325af Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Mon, 16 Oct 2023 05:52:09 -0600 Subject: [PATCH 2/2] Add missing EXPRESSION_LOGICAL_OR --- codegen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codegen.c b/codegen.c index 4899073..27b0b6c 100644 --- a/codegen.c +++ b/codegen.c @@ -1749,6 +1749,10 @@ int codegen_set_flag_for_operator(const char *op) { flag |= EXPRESSION_LOGICAL_AND; } + else if (S_EQ(op, "||")) + { + flag |= EXPRESSION_LOGICAL_OR; + } else if (S_EQ(op, "<<")) { flag |= EXPRESSION_IS_BITSHIFT_LEFT;