Skip to content

Commit 332810c

Browse files
committed
fix bug
1 parent 1b36471 commit 332810c

File tree

1 file changed

+5
-5
lines changed
  • src/main/kotlin/org/lice/compiler/parse

1 file changed

+5
-5
lines changed

src/main/kotlin/org/lice/compiler/parse/Number.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ fun String.toBinInt(): Int {
9898

9999
fun String.toBigInt() = BigInteger(this.substring(0, length - 1).run {
100100
when {
101-
isHexInt() -> toHexInt()
102-
isBinInt() -> toBinInt()
103-
isOctInt() -> toOctInt()
104-
else -> toInt()
101+
isHexInt() -> toHexInt().toString()
102+
isBinInt() -> toBinInt().toString()
103+
isOctInt() -> toOctInt().toString()
104+
else -> this
105105
}
106-
}.toString())
106+
})
107107

108108
fun String.toBigDec() = BigDecimal(this.substring(0, length - 1))
109109

0 commit comments

Comments
 (0)