mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix issue #244 with constant array comparisons
This commit is contained in:
@@ -1553,7 +1553,11 @@ void check_comparison(CheckerContext *c, Operand *x, Operand *y, TokenKind op) {
|
|||||||
} else {
|
} else {
|
||||||
if (x->mode == Addressing_Constant &&
|
if (x->mode == Addressing_Constant &&
|
||||||
y->mode == Addressing_Constant) {
|
y->mode == Addressing_Constant) {
|
||||||
|
if (is_type_constant_type(x->type)) {
|
||||||
x->value = exact_value_bool(compare_exact_values(op, x->value, y->value));
|
x->value = exact_value_bool(compare_exact_values(op, x->value, y->value));
|
||||||
|
} else {
|
||||||
|
x->mode = Addressing_Value;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
x->mode = Addressing_Value;
|
x->mode = Addressing_Value;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user