Fix decodeHex() logic error

This commit is contained in:
Peter Cai 2022-08-01 17:13:27 -04:00
parent f654a19a21
commit 7692fc1255
1 changed files with 1 additions and 1 deletions

View File

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