LCL: fixed memory corruption introduced in r59880 #5fabf10223. issue #34708

git-svn-id: trunk@59888 -
This commit is contained in:
zeljko 2018-12-21 16:09:11 +00:00
parent 8abb8ccdeb
commit 5e3ff3cf84

View File

@ -1459,7 +1459,7 @@ begin
ToR.AllocData(ToR.FCount);
if ToR.FCount>0 then
begin
DataSize := ToR.FWidth * ToR.FHeight * SizeOf(FData[0]);
DataSize := ToR.FWidth * ToR.FHeight; {issue #34708 * SizeOf(FData[0])};
System.Move(FromR.FData[0], ToR.FData[0], ToR.FCount * DataSize);
end;
end;