aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-06-15 23:01:12 +0100
committergingerBill <bill@gingerbill.org>2018-06-15 23:01:12 +0100
commitba776a3c9fbaa8f64f1567112c71c93416776260 (patch)
tree094b956896d45cf2effc3045113c030120d9eaef /src/check_expr.cpp
parentcd7e260f4e77ea992115b3dd26d7b92d99bae0f7 (diff)
Fix bitwise not for signed integers
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp2
1 files changed, 1 insertions, 1 deletions
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) {