mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 09:59:08 +02:00
* Move() check for identical index. Additional fix for #39617
This commit is contained in:
parent
2a19e152b7
commit
59a7024d73
@ -261,6 +261,8 @@ var
|
|||||||
begin
|
begin
|
||||||
CheckIndex(CurIndex);
|
CheckIndex(CurIndex);
|
||||||
CheckIndex(NewIndex);
|
CheckIndex(NewIndex);
|
||||||
|
if (CurIndex=NewIndex) then
|
||||||
|
exit;
|
||||||
Temp := FList^[CurIndex];
|
Temp := FList^[CurIndex];
|
||||||
if NewIndex > CurIndex then
|
if NewIndex > CurIndex then
|
||||||
System.Move(FList^[CurIndex+1], FList^[CurIndex], (NewIndex - CurIndex) * SizeOf(Pointer))
|
System.Move(FList^[CurIndex+1], FList^[CurIndex], (NewIndex - CurIndex) * SizeOf(Pointer))
|
||||||
|
Loading…
Reference in New Issue
Block a user