1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-16 09:35:15 +00:00

Prevents adding SHARED variables to SUB vWatch()

This commit is contained in:
FellippeHeitor 2021-07-24 12:00:40 -03:00
parent 6436ee76bf
commit c621917a69

View file

@ -14261,19 +14261,23 @@ SUB vWatchVariable (this$, action AS _BYTE)
mainModuleVariablesList$ = "" mainModuleVariablesList$ = ""
totalMainModuleVariables = 0 totalMainModuleVariables = 0
ELSE ELSE
IF totalLocalVariables + totalSharedVariablesFromMainModule > 0 THEN IF subfunc <> "SUB_VWATCH" THEN
PRINT #13, "void *vwatch_local_vars["; (totalLocalVariables + totalSharedVariablesFromMainModule); "];" IF totalLocalVariables + totalSharedVariablesFromMainModule > 0 THEN
i = totalLocalVariables PRINT #13, "void *vwatch_local_vars["; (totalLocalVariables + totalSharedVariablesFromMainModule); "];"
tempShared$ = mainModuleSharedVariablesList$ i = totalLocalVariables
tempVar$ = "" tempShared$ = mainModuleSharedVariablesList$
DO UNTIL i = totalLocalVariables + totalSharedVariablesFromMainModule tempVar$ = ""
length = CVL(LEFT$(tempShared$, 4)) DO UNTIL i = totalLocalVariables + totalSharedVariablesFromMainModule
tempVar$ = MID$(tempShared$, 5, length) length = CVL(LEFT$(tempShared$, 4))
tempShared$ = MID$(tempShared$, 5 + length) tempVar$ = MID$(tempShared$, 5, length)
localVariablesList$ = localVariablesList$ + "vwatch_local_vars[" + str2$(i) + "] = &" + tempVar$ + ";" + CRLF tempShared$ = MID$(tempShared$, 5 + length)
i = i + 1 localVariablesList$ = localVariablesList$ + "vwatch_local_vars[" + str2$(i) + "] = &" + tempVar$ + ";" + CRLF
LOOP i = i + 1
PRINT #13, localVariablesList$ LOOP
PRINT #13, localVariablesList$
ELSE
PRINT #13, "void *vwatch_local_vars[0];"
END IF
ELSE ELSE
PRINT #13, "void *vwatch_local_vars[0];" PRINT #13, "void *vwatch_local_vars[0];"
END IF END IF