Browse Source

* Some fixes by Onur Sayman

git-svn-id: trunk@3574 -
daniel 19 years ago
parent
commit
1ff11a399f
2 changed files with 10 additions and 3 deletions
  1. 2 0
      fv/drivers.pas
  2. 8 3
      fv/editors.pas

+ 2 - 0
fv/drivers.pas

@@ -1188,6 +1188,8 @@ begin
    end
   else
    FillChar(Event,sizeof(TEvent),0);
+  if MouseReverse and ((Event.Buttons and 3) in [1,2]) then
+    Event.Buttons := Event.Buttons xor 3;
 end;
 
 {---------------------------------------------------------------------------}

+ 8 - 3
fv/editors.pas

@@ -1069,9 +1069,14 @@ Var
   c      : char;
 begin
   len:=length(str);
+  if (len=0) or (len>size) then
+  begin
+    IScan := NotFoundValue;
+    exit;
+  end;
   { create uppercased string }
   s[0]:=chr(len);
-  for x:=1to len do
+  for x:=1 to len do
    begin
      if str[x] in ['a'..'z'] then
       s[x]:=chr(ord(str[x])-32)
@@ -1114,8 +1119,8 @@ begin
     IScan := NotFoundValue
   else
     IScan := numb - pred(len);
-end;
-
+end; 
+  
 
 {****************************************************************************
                                  TIndicator