mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/calc] Replacing ans in the input may make the input unparsable
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user