Bugfix - group regex
authorTomas Wenström <tomas.wenstrom@gmail.com>
Sun, 11 Aug 2019 10:59:34 +0000 (12:59 +0200)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Sun, 11 Aug 2019 10:59:34 +0000 (12:59 +0200)
src/kaka/cakelight/Console.java

index cd48f49..faa7054 100644 (file)
@@ -47,11 +47,11 @@ public class Console extends Thread {
                    );
                    cakelight.setMode(new SingleColorMode(c));
                    System.out.println("setting color to " + c);
-               } else if (input.matches("g|gamma\\s+[0-9.]+")) {
+               } else if (input.matches("(g|gamma)\\s+[0-9.]+")) {
                    String[] split = input.split("\\s+");
                    config.gamma = Double.parseDouble(split[1]);
                    System.out.println("setting gamma to " + config.gamma);
-               } else if (input.matches("s|saturation\\s+[0-9.]+")) {
+               } else if (input.matches("(s|saturation)\\s+[0-9.]+")) {
                    String[] split = input.split("\\s+");
                    config.video.saturation = Double.parseDouble(split[1]);
                    System.out.println("setting saturation to " + config.video.saturation);