From 2293beb69246ceb3287bef7a4e278a7a6dbea2e9 Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Mon, 22 Feb 2016 08:19:54 -0300 Subject: [PATCH] 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. --- source/qb64.bas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/qb64.bas b/source/qb64.bas index 5dabd0b22..a8b56a0e9 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -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