Browse Source

FIX: Range check error

Alexander Koblov 15 years ago
parent
commit
33ebffce82
2 changed files with 5 additions and 2 deletions
  1. 4 1
      sdk/wlxplugin.pas
  2. 1 1
      src/uwlxmodule.pas

+ 4 - 1
sdk/wlxplugin.pas

@@ -45,6 +45,9 @@ type
   { Unsigned integer with pointer size }
   { Unsigned integer with pointer size }
   THandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF};
   THandle = {$IFDEF CPU64}QWord{$ELSE}LongWord{$ENDIF};
 
 
+const
+  wlxInvalidHandle: THandle = THandle(-1);
+
 type
 type
   tListDefaultParamStruct=record
   tListDefaultParamStruct=record
     size,
     size,
@@ -93,4 +96,4 @@ function ListGetPreviewBitmapW(FileToLoad:pwidechar;width,height:integer; conten
 
 
 implementation
 implementation
 
 
-end.
+end.

+ 1 - 1
src/uwlxmodule.pas

@@ -282,7 +282,7 @@ begin
   else if Assigned(ListLoad) then
   else if Assigned(ListLoad) then
     FPluginWindow:= ListLoad(ParentWin, PAnsiChar(UTF8ToSys(FileToLoad)), ShowFlags)
     FPluginWindow:= ListLoad(ParentWin, PAnsiChar(UTF8ToSys(FileToLoad)), ShowFlags)
   else
   else
-    Exit(feInvalidHandle);
+    Exit(wlxInvalidHandle);
 
 
   Result:= FPluginWindow;
   Result:= FPluginWindow;
 end;
 end;