[apps] Avoid infinite value in editable table

Change-Id: I8ebbf99c244e7b7008c788aec8eed71b9ae20580
This commit is contained in:
Émilie Feral
2017-03-20 10:23:52 +01:00
parent 8bc326dba1
commit 4f089b2cf8
2 changed files with 2 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ bool EditableCellTableViewController::textFieldDidFinishEditing(TextField * text
AppsContainer * appsContainer = ((TextFieldDelegateApp *)app())->container();
Context * globalContext = appsContainer->globalContext();
float floatBody = Expression::parse(text)->approximate(*globalContext);
if (isnan(floatBody)) {
if (isnan(floatBody) || isinf(floatBody)) {
app()->displayWarning(I18n::Message::UndefinedValue);
return false;
}