From 807b2ada854a8f34f4d25b2877bba409d3e55f7c Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Tue, 19 May 2020 20:21:40 +0000 Subject: [PATCH] convertColors: Fix bug in computation in how many bytes are saved Signed-off-by: Niels Thykier --- scour/scour.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scour/scour.py b/scour/scour.py index 4b71ad1..638ee5f 100644 --- a/scour/scour.py +++ b/scour/scour.py @@ -2205,7 +2205,7 @@ def convertColors(element): newBytes = len(newColorValue) if oldBytes > newBytes: styles[attr] = newColorValue - numBytes += (oldBytes - len(element.getAttribute(attr))) + numBytes += (oldBytes - newBytes) _setStyle(element, styles) # now recurse for our child elements