1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-06 01:10:23 +00:00

Prevent crash when using CLEAR with var-len string UDTs

Still doesn't fix it, but prevents the crash.
Variables won't be cleared with this temporary patch.
This commit is contained in:
FellippeHeitor 2021-09-26 21:06:44 -03:00
parent 64306e4e10
commit 5c9cc96ca7

View file

@ -11485,7 +11485,11 @@ FOR i = 1 TO idn
END IF END IF
END IF END IF
IF typ AND ISUDT THEN IF typ AND ISUDT THEN
IF udtxvariable(typ AND 511) THEN
'this is where new code must come to clear UDTs with variable-length strings
ELSE
PRINT #12, "memset((void*)" + e$ + ",0," + bytes$ + ");" PRINT #12, "memset((void*)" + e$ + ",0," + bytes$ + ");"
END IF
ELSE ELSE
IF INSTR(vWatchVariableExclusions$, "@" + e$ + "@") = 0 AND LEFT$(e$, 12) <> "_SUB_VWATCH_" THEN IF INSTR(vWatchVariableExclusions$, "@" + e$ + "@") = 0 AND LEFT$(e$, 12) <> "_SUB_VWATCH_" THEN
PRINT #12, "*" + e$ + "=0;" PRINT #12, "*" + e$ + "=0;"