diff --git a/lib/vf_settokenvalue.cpp b/lib/vf_settokenvalue.cpp index 391fdc947a6..a6076a9904a 100644 --- a/lib/vf_settokenvalue.cpp +++ b/lib/vf_settokenvalue.cpp @@ -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; @@ -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;