Browse Source

* Fix comparedword and change it to cardinal.

git-svn-id: trunk@7804 -
daniel 18 years ago
parent
commit
8ee5966a2e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      rtl/inc/generic.inc

+ 4 - 4
rtl/inc/generic.inc

@@ -262,20 +262,20 @@ end;
 {$ifndef FPC_SYSTEM_HAS_COMPAREDWORD}
 function CompareDWord(Const buf1,buf2;len:SizeInt):SizeInt;
 type
-  longintarray = array [0..high(sizeint) div 4-1] of longint;
+  cardinalarray = array [0..high(sizeint) div 4-1] of cardinal;
 var
-  I : longint;
+  I : int64;
 begin
   I:=0;
   if (Len<>0) and (@Buf1<>@Buf2) then
    begin
-     while (longintarray(Buf1)[I]=longintarray(Buf2)[I]) and (I<Len) do
+     while (cardinalarray(Buf1)[I]=cardinalarray(Buf2)[I]) and (I<Len) do
       inc(I);
      if I=Len then  {No difference}
       I:=0
      else
       begin
-        I:=longintarray(Buf1)[I]-longintarray(Buf2)[I];
+        I:=int64(cardinalarray(Buf1)[I])-int64(cardinalarray(Buf2)[I]);
         if I>0 then
          I:=1
         else