Merge pull request #2798 from RaiKoHoff/Dev_RC1

Fix crash on rectangular selection (TinyExpr evaluation)
This commit is contained in:
Pairi Daiza 2020-09-14 15:52:46 +02:00 committed by GitHub
commit dc14696ac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}