Browse Source

Fix decodeHex() logic error

master
Peter Cai 1 week ago
parent
commit
7692fc1255
  1. 2
      libs/lpad-sm-dp-plus-connector/src/main/java/com/truphone/util/TextUtil.kt

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

Loading…
Cancel
Save