From fa62fb977909019b267349db2bba8483b8839748 Mon Sep 17 00:00:00 2001 From: RaiKoHoff Date: Mon, 14 Sep 2020 15:40:51 +0200 Subject: [PATCH] + fix: crash on rectangular selection --- src/Notepad3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index 17fcf5098..501683a34 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -8665,7 +8665,6 @@ static double _InterpMultiSelectionTinyExpr(te_xint_t* piExprError) MultiByteToWideChar(Encoding_SciCP, 0, calcBuffer, -1, calcBufferW, calcBufSize); WideCharToMultiByte(1252, (WC_COMPOSITECHECK | WC_DISCARDNS), calcBufferW, -1, calcBuffer, calcBufSize, &defchar, NULL); StrDelChrA(calcBuffer, chr_currency); - FreeMem(calcBufferW); if (!StrIsEmptyA(tmpRectSelN)) { @@ -8677,6 +8676,7 @@ static double _InterpMultiSelectionTinyExpr(te_xint_t* piExprError) } } double const result = te_interp(calcBuffer, piExprError); + FreeMem(calcBufferW); FreeMem(calcBuffer); return result; }