Browse Source

* fix arguments for shortstr_compare

peter 21 years ago
parent
commit
62850815bd
1 changed files with 7 additions and 4 deletions
  1. 7 4
      rtl/inc/generic.inc

+ 7 - 4
rtl/inc/generic.inc

@@ -604,15 +604,15 @@ var
    s1,s2,max,i : byte;
    s1,s2,max,i : byte;
    d : longint;
    d : longint;
 begin
 begin
-  s1:=length(right);
-  s2:=length(left);
+  s1:=length(left);
+  s2:=length(right);
   if s1<s2 then
   if s1<s2 then
     max:=s1
     max:=s1
   else
   else
     max:=s2;
     max:=s2;
   for i:=1 to max do
   for i:=1 to max do
     begin
     begin
-     d:=byte(right[i])-byte(left[i]);
+     d:=byte(left[i])-byte(right[i]);
      if d>0 then
      if d>0 then
        exit(1)
        exit(1)
      else if d<0 then
      else if d<0 then
@@ -1225,7 +1225,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.77  2004-05-02 00:31:03  peter
+  Revision 1.78  2004-05-02 15:15:45  peter
+    * fix arguments for shortstr_compare
+
+  Revision 1.77  2004/05/02 00:31:03  peter
     * fixed compile with 1.0.x
     * fixed compile with 1.0.x
 
 
   Revision 1.76  2004/05/01 23:55:18  peter
   Revision 1.76  2004/05/01 23:55:18  peter