Fixes bug when the string has emojis and is trying to check if it is a hex or not
This commit is contained in:
@@ -43,6 +43,7 @@ object Hex {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
for (c in hex.indices) {
|
for (c in hex.indices) {
|
||||||
|
if (c < 0 || c > 255) return false
|
||||||
if (hexToByte[hex[c].code] < 0) return false
|
if (hexToByte[hex[c].code] < 0) return false
|
||||||
}
|
}
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
|
|||||||
Reference in New Issue
Block a user