diff --git a/internal/support/vwatch/vwatch.bm b/internal/support/vwatch/vwatch.bm index 06094c5df..950f4cec5 100644 --- a/internal/support/vwatch/vwatch.bm +++ b/internal/support/vwatch/vwatch.bm @@ -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_varSize = CVL(MID$(vw_buf$, LEN(vw_address) + 1)) - IF vw_varSize = LEN(vw_value$) THEN - 'resize was successful - vw_m = _MEM(vw_address, vw_varSize) - _MEMPUT vw_m, vw_m.OFFSET, vw_value$ + IF vw_varSize < LEN(vw_value$) THEN + vw_value$ = LEFT$(vw_value$, vw_varSize) END IF + vw_m = _MEM(vw_address, vw_varSize) + _MEMPUT vw_m, vw_m.OFFSET, vw_value$ CASE "current sub" vw_cmd$ = "current sub:" + LEFT$(vwatch_stack(vwatch_sublevel), INSTR(vwatch_stack(vwatch_sublevel), ",") - 1) GOSUB SendCommand diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index a9c6f595d..a44bbb4d1 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -8070,7 +8070,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar) IF IdeDebugMode > 0 THEN IF usedVariableList(x).subfunc = currentScope$ OR usedVariableList(x).subfunc = "" 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 ELSE l$ = l$ + " "