mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-06-05 21:49:13 +02:00
This commit takes care also of the percent operator
This commit is contained in:
@ -147,7 +147,7 @@ class CalculatorImpl(calculator: Calculator, private val context: Context) {
|
|||||||
|
|
||||||
secondValue = getSecondValue()
|
secondValue = getSecondValue()
|
||||||
calculateResult()
|
calculateResult()
|
||||||
if (lastOperation == DIVIDE && secondValue == 0.0) {
|
if ( (lastOperation == DIVIDE || lastOperation == PERCENT) && secondValue == 0.0) {
|
||||||
lastKey = DIGIT
|
lastKey = DIGIT
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user