Skip to content

Commit

Permalink
Fix NumberFormatException when "." is the only input
Browse files Browse the repository at this point in the history
  • Loading branch information
mdrlzy committed Sep 2, 2024
1 parent 263966a commit 060bcd0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/dev/arkbuilders/rate/data/CurrUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,6 @@ fun String.toDoubleSafe() =
when {
this == "" -> 0.0
this == "-" -> 0.0
this == "." -> 0.0
else -> this.toDouble()
}

0 comments on commit 060bcd0

Please sign in to comment.