Skip to content

Commit 457818c

Browse files
committed
Fix EQV bug. "0 EQV 0" will return correct result "1"
1 parent baf79fe commit 457818c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/common/eval.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,12 @@ static inline void oper_log(var_t *r, var_t *left) {
531531
b = ri;
532532
ri = 0;
533533
set = 0;
534+
535+
if ((a == 0) & (b == 0)) {
536+
ri = 1;
537+
break;
538+
}
539+
534540
for (i = (sizeof(var_int_t) * 8) - 1; i >= 0; i--) {
535541
int ba = ((a >> i) & 1);
536542
int bb = ((b >> i) & 1);

0 commit comments

Comments
 (0)