Solves crashing when a p-tag contains only "ffff"

This commit is contained in:
Vitor Pamplona 2024-12-30 15:42:54 -05:00
parent fc72e20da7
commit 266d4cb34f

View File

@ -165,7 +165,7 @@ class RobohashAssembler {
isLightTheme: Boolean,
): ImageVector {
val hash =
if (HexValidator.isHex(msg)) {
if (HexValidator.isHex(msg) && msg.length > 10) {
Hex.decode(msg)
} else {
Log.w("Robohash", "$msg is not a hex")