Explorar o código

* fixed potential range errors

git-svn-id: trunk@8321 -
Jonas Maebe %!s(int64=18) %!d(string=hai) anos
pai
achega
9238ea2850
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      rtl/objpas/sysutils/sysformt.inc

+ 2 - 2
rtl/objpas/sysutils/sysformt.inc

@@ -318,7 +318,7 @@ begin
                    index:=31;
                  end;
               If Prec>index then
-                ToAdd:=HexStr(vq,index)
+                ToAdd:=HexStr(int64(vq),index)
               else
                 begin
                 // determine minimum needed number of hex digits.
@@ -327,7 +327,7 @@ begin
                   inc(Index);
                 If Index>Prec then
                   Prec:=Index;
-                ToAdd:=HexStr(vq,Prec);
+                ToAdd:=HexStr(int64(vq),Prec);
                 end;
               end;
         '%': ToAdd:='%';