From ba776a3c9fbaa8f64f1567112c71c93416776260 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 15 Jun 2018 23:01:12 +0100 Subject: Fix bitwise not for signed integers --- src/check_expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_expr.cpp') diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 1529010ca..6d00087e2 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1465,7 +1465,7 @@ void check_unary_expr(CheckerContext *c, Operand *o, Token op, AstNode *node) { return; } - o->value = exact_unary_operator_value(op.kind, o->value, precision); + o->value = exact_unary_operator_value(op.kind, o->value, precision, is_type_unsigned(type)); if (is_type_typed(type)) { if (node != nullptr) { -- cgit v1.2.3