Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more generic catch for badly formatted equations

  • Loading branch information...
commit 387be2b3cb7f036d7b85a88bba254aef6908ac13 1 parent d2b2bde
@Xlythe authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  src/com/android2/calculator3/Logic.java
View
3  src/com/android2/calculator3/Logic.java
@@ -430,7 +430,6 @@ void updateGraph(final Graph g) {
return;
}
- if(!eq.contains("=")) return;
if(eq.endsWith(mPlusString) ||
eq.endsWith(mMinusString) ||
eq.endsWith(mDivString) ||
@@ -449,7 +448,7 @@ void updateGraph(final Graph g) {
final String[] equation = eq.split("=");
- if(equation.length == 1) return;
+ if(equation.length != 2) return;
// Translate into decimal
equation[0] = updateTextToNewMode(localize(equation[0]), mode, Mode.DECIMAL);
Please sign in to comment.
Something went wrong with that request. Please try again.