Skip to content

Commit

Permalink
Update Expression.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkempire78 committed Mar 24, 2023
1 parent 392297d commit 58811e4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ class Expression {
if(calculation[operatorBeforePercentPos] == '/') {
// insert brackets into percentage. Fixes 900/10% -> 900/(10/100), not 900/10/100 which evals differently.
// also prevents it from doing the rest of this function, which screws the calculation up
var stringFirst = calculation.substring(0, operatorBeforePercentPos+1)
var stringMiddle = calculation.substring(operatorBeforePercentPos+1, percentPos+1)
var stringLast = calculation.substring(percentPos+1, calculation.length)
val stringFirst = calculation.substring(0, operatorBeforePercentPos+1)
val stringMiddle = calculation.substring(operatorBeforePercentPos+1, percentPos+1)
val stringLast = calculation.substring(percentPos+1, calculation.length)
return "$stringFirst($stringMiddle)$stringLast"
}

Expand Down

0 comments on commit 58811e4

Please sign in to comment.