From: Wolfgang (Blub) Bumiller Date: Tue, 14 Aug 2012 21:52:57 +0000 (+0200) Subject: bit-and const-fold should use bitand not bitor X-Git-Tag: 0.1-rc1~280 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=475cb97404837aa7b004cbd2e04ee5b861d24789;p=xonotic%2Fgmqcc.git bit-and const-fold should use bitand not bitor --- 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),