From 1eca53a681301256bbf41d4bd551e55fdb91a480 Mon Sep 17 00:00:00 2001 From: Nikolay Nikolov <nickysn@gmail.com> Date: Sat, 1 Apr 2023 21:50:56 +0300 Subject: [PATCH] + support 16-bit pointers in TFPList.IndexOf --- rtl/objpas/classes/lists.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtl/objpas/classes/lists.inc b/rtl/objpas/classes/lists.inc index 2b7f3c6c1b..efc78f4e22 100644 --- a/rtl/objpas/classes/lists.inc +++ b/rtl/objpas/classes/lists.inc @@ -212,7 +212,9 @@ function TFPList.IndexOf(Item: Pointer): Integer; begin Result := -{$if sizeof(pointer) = sizeof(dword)} +{$if sizeof(pointer) = sizeof(word)} + IndexWord +{$elseif sizeof(pointer) = sizeof(dword)} IndexDWord {$elseif sizeof(pointer) = sizeof(qword)} IndexQWord