瀏覽代碼

Fix decodeHex() logic error

Peter Cai 3 年之前
父節點
當前提交
7692fc1255
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libs/lpad-sm-dp-plus-connector/src/main/java/com/truphone/util/TextUtil.kt

+ 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")
         }