[apps/graph] Limit the textfield size when renaming a function

This commit is contained in:
Léa Saviot
2018-10-17 14:09:37 +02:00
committed by Émilie Feral
parent 65ec434449
commit 6aab93f3fe

View File

@@ -2,6 +2,7 @@
#define GRAPH_LIST_TEXT_FIELD_FUNCTION_TITLE_CELL_H
#include <apps/shared/function_title_cell.h>
#include <apps/shared/storage_function.h>
#include <apps/shared/text_field_with_extension.h>
namespace Graph {
@@ -30,7 +31,7 @@ public:
protected:
KDRect textFieldFrame() const;
private:
constexpr static int k_textFieldBufferSize = TextField::maxBufferSize();
constexpr static int k_textFieldBufferSize = Shared::StorageFunction::k_maxNameWithArgumentSize;
Shared::TextFieldWithExtension m_textField;
char m_textFieldBuffer[k_textFieldBufferSize];
};