Permalink
Browse files

more generic catch for badly formatted equations

  • Loading branch information...
1 parent d2b2bde commit 387be2b3cb7f036d7b85a88bba254aef6908ac13 @Xlythe committed Sep 24, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 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);

0 comments on commit 387be2b

Please sign in to comment.