From: Wolfgang Bumiller Date: Thu, 14 Nov 2013 10:41:11 +0000 (+0100) Subject: folder: change ~ for floats too X-Git-Tag: xonotic-v0.8.0~91 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=49bb172a0948d2aa665dbc7fd1a41e595ef871f5;p=xonotic%2Fgmqcc.git folder: change ~ for floats too --- diff --git a/fold.c b/fold.c index 48ae6f1..c75106a 100644 --- a/fold.c +++ b/fold.c @@ -616,7 +616,7 @@ static GMQCC_INLINE ast_expression *fold_op_cmp(fold_t *fold, ast_value *a, ast_ static GMQCC_INLINE ast_expression *fold_op_bnot(fold_t *fold, ast_value *a) { if (isfloat(a)) { if (fold_can_1(a)) - return fold_constgen_float(fold, ~((qcint_t)fold_immvalue_float(a))); + return fold_constgen_float(fold, -1-fold_immvalue_float(a)); } else { if (isvector(a)) { if (fold_can_1(a))