ソースを参照

Fix decodeHex() logic error

Peter Cai 3 年 前
コミット
7692fc1255

+ 1 - 1
libs/lpad-sm-dp-plus-connector/src/main/java/com/truphone/util/TextUtil.kt

@@ -51,7 +51,7 @@ object TextUtil {
      */
     @JvmStatic
     fun decodeHex(str: String): ByteArray {
-        if (str.length % 2 == 0) {
+        if (str.length % 2 != 0) {
             throw NumberFormatException("Must have an even length")
         }