Browse Source

elecount also on 32bit needs the qword part to prevent overflow

peter 21 years ago
parent
commit
37139422aa
1 changed files with 4 additions and 5 deletions
  1. 4 5
      compiler/symdef.pas

+ 4 - 5
compiler/symdef.pas

@@ -2893,17 +2893,14 @@ implementation
 
 
 
 
     function tarraydef.elecount : aint;
     function tarraydef.elecount : aint;
-{$ifdef cpu64bit}
       var
       var
         qhigh,qlow : qword;
         qhigh,qlow : qword;
-{$endif cpu64bit}
       begin
       begin
         if IsDynamicArray then
         if IsDynamicArray then
           begin
           begin
             result:=0;
             result:=0;
             exit;
             exit;
           end;
           end;
-{$ifdef cpu64bit}
         if (highrange>0) and (lowrange<0) then
         if (highrange>0) and (lowrange<0) then
           begin
           begin
             qhigh:=highrange;
             qhigh:=highrange;
@@ -2915,7 +2912,6 @@ implementation
               result:=qhigh+qlow+1;
               result:=qhigh+qlow+1;
           end
           end
         else
         else
-{$endif cpu64bit}
           result:=int64(highrange)-lowrange+1;
           result:=int64(highrange)-lowrange+1;
       end;
       end;
 
 
@@ -6218,7 +6214,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.265  2004-11-04 17:09:54  peter
+  Revision 1.266  2004-11-04 17:58:48  peter
+  elecount also on 32bit needs the qword part to prevent overflow
+
+  Revision 1.265  2004/11/04 17:09:54  peter
   fixed debuginfo for variables in staticsymtable
   fixed debuginfo for variables in staticsymtable
 
 
   Revision 1.264  2004/11/03 09:46:34  florian
   Revision 1.264  2004/11/03 09:46:34  florian