[apps/code] autocompletionText uses the right text length

Before, there was no notion that the autocompleted text might not be a
null terminated string.
This commit is contained in:
Léa Saviot
2020-03-24 18:03:46 +01:00
committed by Émilie Feral
parent 12bb77cd9f
commit eeb42f2544
10 changed files with 31 additions and 35 deletions

View File

@@ -27,7 +27,7 @@ public:
/* VariableBoxController */
void loadFunctionsAndVariables(int scriptIndex, const char * textToAutocomplete);
const char * autocompletionForText(int scriptIndex, const char * text);
const char * autocompletionForText(int scriptIndex, const char * text, int * textToInsertLength);
private:
constexpr static int k_maxScriptObjectNameSize = 100;
constexpr static int k_maxNumberOfDisplayedRows = 6; // 240/40