[apps] Code: Fix autoImportScript to avoid corrupting stack

This commit is contained in:
Émilie Feral
2018-03-27 15:51:58 +02:00
committed by EmilieNumworks
parent f1ddf1dbf4
commit 9cadc49264
2 changed files with 10 additions and 25 deletions

View File

@@ -34,7 +34,6 @@ public:
void autoImport();
void autoImportScript(Script script, bool force = false);
void runAndPrintForCommand(const char * command);
void removeExtensionIfAny(char * name);
// ViewController
View * view() override { return &m_selectableTableView; }
@@ -74,6 +73,9 @@ public:
}
#endif
private:
static constexpr const char * k_importCommand1 = "from ";
static constexpr const char * k_importCommand2 = " import *";
static constexpr size_t k_maxImportCommandSize = 5 + 9 + TextField::maxBufferSize(); // strlen(k_importCommand1) + strlen(k_importCommand2) + TextField::maxBufferSize()
bool inputRunLoopActive() { return m_inputRunLoopActive; }
void askInputRunLoopTermination() { m_inputRunLoopActive = false; }
static constexpr int LineCellType = 0;