Skip to content

Commit

Permalink
fixup! Truncate value of increment/decrement operator
Browse files Browse the repository at this point in the history
  • Loading branch information
francois-berder committed Jun 7, 2024
1 parent ad8fdc6 commit ab7ffc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vf_settokenvalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ namespace ValueFlow
if (v.bound != ValueFlow::Value::Bound::Point) {
if (newvalue < v.intvalue) {
v.invertBound();
newvalue -= 1;
newvalue -= 2;
}
}
v.intvalue = newvalue;
Expand Down Expand Up @@ -671,7 +671,7 @@ namespace ValueFlow
if (v.bound != ValueFlow::Value::Bound::Point) {
if (newvalue > v.intvalue) {
v.invertBound();
newvalue += 1;
newvalue += 2;
}
}
v.intvalue = newvalue;
Expand Down

0 comments on commit ab7ffc1

Please sign in to comment.