From 475cb97404837aa7b004cbd2e04ee5b861d24789 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Tue, 14 Aug 2012 23:52:57 +0200 Subject: [PATCH] bit-and const-fold should use bitand not bitor --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.c b/parser.c index f45bfdc..f8f5e97 100644 --- a/parser.c +++ b/parser.c @@ -616,7 +616,7 @@ static bool parser_sy_pop(parser_t *parser, shunt *sy) if (CanConstFold(exprs[0], exprs[1])) out = (ast_expression*)parser_const_float(parser, (op->id == opid1('|') ? (float)( ((qcint)ConstF(0)) | ((qcint)ConstF(1)) ) : - (float)( ((qcint)ConstF(0)) | ((qcint)ConstF(1)) ) )); + (float)( ((qcint)ConstF(0)) & ((qcint)ConstF(1)) ) )); else out = (ast_expression*)ast_binary_new(ctx, (op->id == opid1('|') ? INSTR_BITOR : INSTR_BITAND), -- 2.39.2