From 02545ba78cba37f25addab9017a1ec0dadaa81a7 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 26 Feb 2019 14:34:11 +0700 Subject: [PATCH] Make --def name=value sanity check less strict --- source/net/filebot/cli/BindingsHandler.java | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/source/net/filebot/cli/BindingsHandler.java b/source/net/filebot/cli/BindingsHandler.java index c6df1e09..2df45dc1 100644 --- a/source/net/filebot/cli/BindingsHandler.java +++ b/source/net/filebot/cli/BindingsHandler.java @@ -81,21 +81,7 @@ public class BindingsHandler extends MapOptionHandler { return false; } - for (int i = 0; i < n.length();) { - int c = n.codePointAt(i); - - if (i == 0) { - if (!Character.isUnicodeIdentifierStart(c)) - return false; - } else { - if (!Character.isUnicodeIdentifierPart(c)) - return false; - } - - i += Character.charCount(c); - } - - return true; + return Character.isUnicodeIdentifierStart(n.codePointAt(0)); } @Override