From aff71992537f2db01033cf86a2395f0503e8c99a Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Tue, 28 Sep 2021 00:00:39 -0300 Subject: [PATCH] Fetch storage slot when setting variables. --- source/ide/ide_methods.bas | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 7f6eac1df..8cf013097 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -8265,7 +8265,23 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction) 'scope is valid (or we're setting a watchpoint) tempArrayIndex& = 0 tempArrayIndexes$ = MKL$(0) + tempStorage& = 0 + IF LEN(usedVariableList(tempIndex&).storage) = 4 THEN + tempStorage& = CVL(usedVariableList(tempIndex&).storage) + ELSEIF LEN(usedVariableList(tempIndex&).storage) > 4 THEN + i = 4 + DO + i = INSTR(i + 1, variableWatchList$, MKL$(-1) + MKL$(tempIndex&) + tempArrayIndexes$) + IF i = 0 THEN EXIT DO + IF MID$(variableWatchList$, i + 8 + LEN(tempArrayIndexes$), 4) = tempElementOffset$ THEN + 'we found where this element's value is being stored + tempStorage& = CVL(MID$(variableWatchList$, i + 16 + LEN(tempArrayIndexes$), 4)) + EXIT DO + END IF + LOOP + END IF + tempIsUDT& = 0 tempElementOffset$ = MKL$(0) IF usedVariableList(tempIndex&).isarray THEN