Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Fix duplicated suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
intsuc committed Jul 13, 2023
1 parent 02eeec2 commit f3a04a9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/kotlin/mcx/pass/backend/Generate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,20 @@ class Generate private constructor(
when (tag.value) {
Float.POSITIVE_INFINITY -> append(INFINITY_F)
Float.NEGATIVE_INFINITY -> append("-$INFINITY_F")
else -> append(tag.value.toString())
else -> {
append(tag.value.toString())
append('f')
}
}
append('f')
}
is DoubleTag -> {
when (tag.value) {
Double.POSITIVE_INFINITY -> append(INFINITY_D)
Double.NEGATIVE_INFINITY -> append("-$INFINITY_D")
else -> append(tag.value.toString())
else -> {
append(tag.value.toString())
append('d')
}
}
}
is ByteArrayTag -> {
Expand Down

0 comments on commit f3a04a9

Please sign in to comment.