Browse Source

* fixed possible overflow when getting video mode

git-svn-id: trunk@4456 -
florian 19 years ago
parent
commit
f8bdc64a96
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/win/video.pp

+ 1 - 1
rtl/win/video.pp

@@ -245,7 +245,7 @@ end;
 Function SysGetVideoModeData (Index : Word; Var Data : TVideoMode) : boolean;
 Function SysGetVideoModeData (Index : Word; Var Data : TVideoMode) : boolean;
 
 
 begin
 begin
-  SysGetVideoModeData:=(Index<=SysVideoModeCount);
+  SysGetVideoModeData:=(Index<=high(SysVMD));
   If SysGetVideoModeData then
   If SysGetVideoModeData then
     Data:=SysVMD[Index];
     Data:=SysVMD[Index];
 end;
 end;