Skip to content

Commit

Permalink
Merge pull request #97 from IVOES/cpp/comparison-precedence
Browse files Browse the repository at this point in the history
Fixed incorrect operator precedence
  • Loading branch information
paladin-t committed Mar 26, 2024
2 parents f5aba59 + 42d38ac commit 0326331
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/my_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ static _object_t* _exp_assign = 0;
do { \
_instruct_common(__tuple) \
if(opndv1.type == _DT_INT && opndv2.type == _DT_INT) { \
if((real_t)(opndv1.data.integer __optr opndv2.data.integer) == (real_t)opndv1.data.integer __optr (real_t)opndv2.data.integer) { \
if((real_t)(opndv1.data.integer __optr opndv2.data.integer) == ((real_t)opndv1.data.integer __optr (real_t)opndv2.data.integer)) { \
val->type = _DT_INT; \
val->data.integer = opndv1.data.integer __optr opndv2.data.integer; \
} else { \
Expand Down

0 comments on commit 0326331

Please sign in to comment.