Browse Source

* Fixed IntToHex in case of (0,0)

git-svn-id: trunk@16026 -
michael 15 years ago
parent
commit
b93ab63038
1 changed files with 4 additions and 0 deletions
  1. 4 0
      rtl/objpas/sysutils/sysstr.inc

+ 4 - 0
rtl/objpas/sysutils/sysstr.inc

@@ -753,6 +753,8 @@ const
 function IntToHex(Value: integer; Digits: integer): string;
 var i: integer;
 begin
+ If Digits=0 then 
+   Digits:=1;
  SetLength(result, digits);
  for i := 0 to digits - 1 do
   begin
@@ -768,6 +770,8 @@ end ;
 function IntToHex(Value: int64; Digits: integer): string;
 var i: integer;
 begin
+ If Digits=0 then 
+   Digits:=1;
  SetLength(result, digits);
  for i := 0 to digits - 1 do
   begin