diff --git a/common/lib/capa/util.py b/common/lib/capa/util.py index f1cc8f859e..58e701cbc3 100644 --- a/common/lib/capa/util.py +++ b/common/lib/capa/util.py @@ -13,7 +13,7 @@ def compare_with_tolerance(v1, v2, tol): - tol : tolerance (string or number) ''' - relative = "%" in tol + relative = tol.endswith('%') if relative: tolerance_rel = evaluator(dict(),dict(),tol[:-1]) * 0.01 tolerance = tolerance_rel * max(abs(v1), abs(v2))