From: Tomas Wenström Date: Mon, 25 Nov 2019 22:52:15 +0000 (+0100) Subject: Bugfix X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=cc124c322996f68454baf4405b2959c84e771296;p=kaka%2Fcakelight.git Bugfix --- diff --git a/src/kaka/cakelight/Commands.java b/src/kaka/cakelight/Commands.java index 048e6c6..f527c12 100644 --- a/src/kaka/cakelight/Commands.java +++ b/src/kaka/cakelight/Commands.java @@ -64,7 +64,7 @@ class Commands { static Console.Command brightness() { return command(new String[] {"b", "brightness"}, (console, args) -> { if (args.length == 1) { - int b = Integer.parseInt(args[0].replaceAll("\\+-", "")); + int b = Integer.parseInt(args[0].replaceAll("[+-]+", "")); if (args[0].startsWith("+")) { b = Math.min(console.getConfig().leds.brightness + b, 31); } else if (args[0].startsWith("-")) {