1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 12:40:36 +00:00

Fix a leak when assigning values to an array of type STRING.

The issue happened with both fixed and variable length string arrays and variables with user defined types containing fixed string elements.
This commit is contained in:
FellippeHeitor 2016-02-22 08:19:54 -03:00
parent d0293ca7dc
commit 2293beb692

View file

@ -20563,6 +20563,7 @@ IF typ AND ISUDT THEN
IF method = 0 THEN e$ = evaluatetotyp(e$, STRINGTYPE - ISPOINTER)
IF Error_Happened THEN EXIT SUB
PRINT #12, "qbs_set(" + r$ + "," + e$ + ");"
PRINT #12, cleanupstringprocessingcall$ + "0);"
ELSE
typ = typ - ISUDT - ISREFERENCE - ISPOINTER
IF typ AND ISARRAY THEN typ = typ - ISARRAY
@ -20608,7 +20609,7 @@ IF id.arraytype THEN
END IF
PRINT #12, l$
END IF
stringprocessinghappened = 1
PRINT #12, cleanupstringprocessingcall$ + "0);"
tlayout$ = tl$
EXIT SUB
END IF