diff --git a/desktop_version/src/Script.cpp b/desktop_version/src/Script.cpp index ffd23668..873265e4 100644 --- a/desktop_version/src/Script.cpp +++ b/desktop_version/src/Script.cpp @@ -376,7 +376,10 @@ void scriptclass::run() for (int i = 0; i < ss_toi(words[4]); i++) { position++; - txt.push_back(commands[position]); + if (position < (int) commands.size()) + { + txt.push_back(commands[position]); + } } } else if (words[0] == "position") @@ -3794,7 +3797,10 @@ void scriptclass::loadcustom(std::string t) int ti=atoi(words[1].c_str()); int nti = ti>=0 && ti<=50 ? ti : 1; for(int ti2=0; ti2=0 && ti<=50 ? ti : 1; for(int ti2=0; ti2