Closed delphidabbler closed 1 year ago
In WideCharToChar in UEncodings the 1st call to WideCharToMultiByte passes reference to Dest array, before that array's size has been set. Instead of passing Dest, nil should be passed here.
WideCharToChar
UEncodings
WideCharToMultiByte
Dest
nil
Instead of
BufSize := WideCharToMultiByte( CodePage, 0, @Source, 1, @Dest[0], 0, nil, nil );
uses
BufSize := WideCharToMultiByte( CodePage, 0, @Source, 1, nil, 0, nil, nil );
Noticed this in caboli branch where Delphi 11.3 threw a range error in this routine. Already applied the fix there.
caboli
Fixed at commit e43816c6007ac3eed30d5e400f4889f278976218
In
WideCharToChar
inUEncodings
the 1st call toWideCharToMultiByte
passes reference toDest
array, before that array's size has been set. Instead of passingDest
,nil
should be passed here.Instead of
uses