mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-22 11:25:08 +00:00
Allows setting fixed-length strings from the IDE.
Displaying them was buggy too, due to them having CHR$(0) before being initialized.
This commit is contained in:
parent
7f0649aa33
commit
600fa69786
2 changed files with 5 additions and 5 deletions
|
@ -279,11 +279,11 @@ SUB vwatch (globalVariables AS _OFFSET, localVariables AS _OFFSET)
|
||||||
|
|
||||||
vw_address = _CV(_OFFSET, LEFT$(vw_buf$, LEN(vw_address))) 'pointer to actual data
|
vw_address = _CV(_OFFSET, LEFT$(vw_buf$, LEN(vw_address))) 'pointer to actual data
|
||||||
vw_varSize = CVL(MID$(vw_buf$, LEN(vw_address) + 1))
|
vw_varSize = CVL(MID$(vw_buf$, LEN(vw_address) + 1))
|
||||||
IF vw_varSize = LEN(vw_value$) THEN
|
IF vw_varSize < LEN(vw_value$) THEN
|
||||||
'resize was successful
|
vw_value$ = LEFT$(vw_value$, vw_varSize)
|
||||||
|
END IF
|
||||||
vw_m = _MEM(vw_address, vw_varSize)
|
vw_m = _MEM(vw_address, vw_varSize)
|
||||||
_MEMPUT vw_m, vw_m.OFFSET, vw_value$
|
_MEMPUT vw_m, vw_m.OFFSET, vw_value$
|
||||||
END IF
|
|
||||||
CASE "current sub"
|
CASE "current sub"
|
||||||
vw_cmd$ = "current sub:" + LEFT$(vwatch_stack(vwatch_sublevel), INSTR(vwatch_stack(vwatch_sublevel), ",") - 1)
|
vw_cmd$ = "current sub:" + LEFT$(vwatch_stack(vwatch_sublevel), INSTR(vwatch_stack(vwatch_sublevel), ",") - 1)
|
||||||
GOSUB SendCommand
|
GOSUB SendCommand
|
||||||
|
|
|
@ -8070,7 +8070,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar)
|
||||||
IF IdeDebugMode > 0 THEN
|
IF IdeDebugMode > 0 THEN
|
||||||
IF usedVariableList(x).subfunc = currentScope$ OR usedVariableList(x).subfunc = "" THEN
|
IF usedVariableList(x).subfunc = currentScope$ OR usedVariableList(x).subfunc = "" THEN
|
||||||
IF usedVariableList(x).watch THEN
|
IF usedVariableList(x).watch THEN
|
||||||
l$ = l$ + " = " + CHR$(16) + CHR$(variableNameColor) + usedVariableList(x).mostRecentValue
|
l$ = l$ + " = " + CHR$(16) + CHR$(variableNameColor) + StrReplace$(usedVariableList(x).mostRecentValue, CHR$(0), " ")
|
||||||
END IF
|
END IF
|
||||||
ELSE
|
ELSE
|
||||||
l$ = l$ + " <out of scope>"
|
l$ = l$ + " <out of scope>"
|
||||||
|
|
Loading…
Reference in a new issue