mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/variable_box_controller] Fix loadCurrentVariablesInScript
Scenario: write the script:
def squares():
for i in range(660):
forward(L)lo)
Put the cursor right of "lo" and press backspace.
This commit is contained in:
@@ -624,8 +624,13 @@ void VariableBoxController::loadCurrentVariablesInScript(const char * scriptCont
|
||||
* nameLength are temporary variables that will be overriden when the
|
||||
* lexer continues lexing or is destroyed.
|
||||
* This was found from stepping in the code and trying. */
|
||||
/* TODO: Try to understand what is happening with tokenInText and
|
||||
* remove this trick.*/
|
||||
while (*tokenInText == ' ') {
|
||||
tokenInText++;
|
||||
}
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (strncmp(tokenInText, name, nameLength) != 0) {
|
||||
if (strncmp(tokenInText, name, nameLength) != 0 && tokenInText > scriptContent) {
|
||||
tokenInText--;
|
||||
} else {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user