diff --git a/src/rules.cpp b/src/rules.cpp index 0855369b5..14ab1942c 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -232,9 +232,10 @@ static void colorizeUDA (Task& task, const std::string& rule, const Color& base, if (task.has (rule.substr (10))) c.blend (base); } - else { - const std::string uda = rule.substr (10, pos-10); - const std::string val = rule.substr (pos+1); + else + { + const std::string uda = rule.substr (10, pos - 10); + const std::string val = rule.substr (pos + 1); if (task.get (uda) == val) c.blend (base); } diff --git a/test/color.uda.t b/test/color.uda.t index cd6309ca8..abb7d527e 100755 --- a/test/color.uda.t +++ b/test/color.uda.t @@ -27,7 +27,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 3; # Ensure environment has no influence. delete $ENV{'TASKDATA'};