mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-01 09:10:37 +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:
parent
64306e4e10
commit
5c9cc96ca7
|
@ -11485,7 +11485,11 @@ FOR i = 1 TO idn
|
|||
END IF
|
||||
END IF
|
||||
IF typ AND ISUDT THEN
|
||||
PRINT #12, "memset((void*)" + e$ + ",0," + bytes$ + ");"
|
||||
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$ + ");"
|
||||
END IF
|
||||
ELSE
|
||||
IF INSTR(vWatchVariableExclusions$, "@" + e$ + "@") = 0 AND LEFT$(e$, 12) <> "_SUB_VWATCH_" THEN
|
||||
PRINT #12, "*" + e$ + "=0;"
|
||||
|
|
Loading…
Reference in a new issue