From 266d4cb34f31c4befd1489f0d1389152121c84bc Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 30 Dec 2024 15:42:54 -0500 Subject: [PATCH] Solves crashing when a p-tag contains only "ffff" --- .../amethyst/commons/robohash/RobohashAssembler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/src/main/java/com/vitorpamplona/amethyst/commons/robohash/RobohashAssembler.kt b/commons/src/main/java/com/vitorpamplona/amethyst/commons/robohash/RobohashAssembler.kt index 0a45343af..b9bfca3b1 100644 --- a/commons/src/main/java/com/vitorpamplona/amethyst/commons/robohash/RobohashAssembler.kt +++ b/commons/src/main/java/com/vitorpamplona/amethyst/commons/robohash/RobohashAssembler.kt @@ -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")