From 47e8b15315b6a3f76bf8432de1024c230e75fa58 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 7 Jun 2020 16:35:46 +0000 Subject: [PATCH] convertColors: Fix bug in computation in how many bytes are saved (#245) 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