From 6d3a1fcda6bff7e128b9405e2f1df48e5dee4da7 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Wed, 29 Jan 2020 08:40:03 -0800 Subject: [PATCH] fix critical bug discovered by #11591 (#13290) [backport] (cherry picked from commit 81a43791f932291c0654e0a5fd6d53ede7a7c1dc) --- compiler/ccgexprs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index a71e326610ef3..aa85550410eb4 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -1824,7 +1824,7 @@ proc genSetOp(p: BProc, e: PNode, d: var TLoc, op: TMagic) = of mCard: if size <= 4: unaryExprChar(p, e, d, "#countBits32($1)") else: unaryExprChar(p, e, d, "#countBits64($1)") - of mLtSet: binaryExprChar(p, e, d, "(($1 & ~ $2 ==0)&&($1 != $2))") + of mLtSet: binaryExprChar(p, e, d, "((($1 & ~ $2)==0)&&($1 != $2))") of mLeSet: binaryExprChar(p, e, d, "(($1 & ~ $2)==0)") of mEqSet: binaryExpr(p, e, d, "($1 == $2)") of mMulSet: binaryExpr(p, e, d, "($1 & $2)")