diff --git a/apps/calculation/app.cpp b/apps/calculation/app.cpp index 2f3433fa3..fd6a2ec45 100644 --- a/apps/calculation/app.cpp +++ b/apps/calculation/app.cpp @@ -103,6 +103,11 @@ bool App::textInputIsCorrect(const char * text) { if (length >= Calculation::k_printedExpressionSize-1) { return false; } + exp = Expression::parse(buffer); + if (exp.isUninitialized()) { + // The ans replacement made the expression unparsable + return false; + } return true; }