diff --git a/apps/graph/function_store.cpp b/apps/graph/function_store.cpp index 5c2d0c277..5f33d0122 100644 --- a/apps/graph/function_store.cpp +++ b/apps/graph/function_store.cpp @@ -20,7 +20,8 @@ Graph::Function * Graph::FunctionStore::functionAtIndex(int i) { void Graph::FunctionStore::pushFunction(const char * functionText) { assert(m_numberOfFunctions < k_maxNumberOfFunctions); - m_functions[m_numberOfFunctions++] = Function(functionText, defaultColors[m_numberOfFunctions%numberOfDefaultColors]); + m_functions[m_numberOfFunctions] = Function(functionText, defaultColors[m_numberOfFunctions%numberOfDefaultColors]); + m_numberOfFunctions++; } int Graph::FunctionStore::numberOfFunctions() {