DEADSOFTWARE

Fix access violation on x86_64
[d2df-sdl.git] / src / engine / e_input.pas
index d4081ee5615075eaa89c26fb80962c47e82e1dda..2a2f435de2c5d5c8ce606e87d9788292995dd766 100644 (file)
@@ -192,14 +192,14 @@ function PollKeyboard(): Boolean;
 var
   Keys: PByte;
   NKeys: Integer;
-  i: Cardinal;
+  i: NativeInt;
 begin
   Result := False;
   Keys := SDL_GetKeyboardState(@NKeys);
   if (Keys = nil) or (NKeys < 1) then
     Exit;
   for i := 0 to NKeys do
-    KeyBuffer[i] := ((PByte(Cardinal(Keys) + i)^) <> 0);
+    KeyBuffer[i] := ((PByte(NativeInt(Keys) + i)^) <> 0);
   for i := NKeys to High(KeyBuffer) do
     KeyBuffer[i] := False;
 end;