1
0
mirror of synced 2024-12-22 09:13:07 +01:00

Fixed: WideString compatibility for Join function

This commit is contained in:
Mark van Renswoude 2014-10-28 18:56:47 +00:00
parent 319f0ba7e9
commit 868b443eae

View File

@ -374,12 +374,12 @@ begin
begin begin
if not firstItem then if not firstItem then
begin begin
Move(PChar(AGlue)^, resultPos^, glueLength); Move(PChar(AGlue)^, resultPos^, glueLength * SizeOf(Char));
Inc(resultPos, glueLength); Inc(resultPos, glueLength);
end else end else
firstItem := False; firstItem := False;
Move(PChar(ASource[itemIndex])^, resultPos^, itemLength); Move(PChar(ASource[itemIndex])^, resultPos^, itemLength * SizeOf(Char));
Inc(resultPos, itemLength); Inc(resultPos, itemLength);
end; end;
end; end;
@ -419,8 +419,8 @@ var
iDest: Integer; iDest: Integer;
begin begin
iSrcLength := Length(ASource); iSrcLength := Length(ASource) * SizeOf(Char);
iLength := Length(AReplace); iLength := Length(AReplace) * SizeOf(Char);
iDiff := iLength - ALength; iDiff := iLength - ALength;
iDest := 1; iDest := 1;