View Issue Details

IDProjectCategoryView StatusLast Update
0035015FPCRTLpublic2019-02-09 18:12
ReporterjosiasmatAssigned ToMarco van de Voort 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86-64OSWindowsOS Version10
Product Version3.0.4Product BuildLazarus 2.0 
Target VersionFixed in Version3.3.1 
Summary0035015: Method ToHexString(const AMinDigits: Integer) returns fixed number of digits instead of minimum
DescriptionThe method ToHexString(const AMinDigits: Integer) always returns a string with a fixed number of hexadecimal digits, instead of a minimum number of digits.
Steps To ReproduceExample:

procedure Test()
var i: Integer;
    S: String;
begin
  i := 10;
  S := i.ToHexString(1); // returns 'A'
  i := 20;
  S := i.ToHexString(1); // returns '4', should return '14'
end;

TagsNo tags attached.
Fixed in Revision41268
FPCOldBugId
FPCTarget
Attached Files

Activities

Marco van de Voort

2019-02-09 18:12

manager   ~0113994

I changed the implementation to call inttohex instead of hexstr, please test (trunk)

Issue History

Date Modified Username Field Change
2019-02-05 18:35 josiasmat New Issue
2019-02-09 18:12 Marco van de Voort Fixed in Revision => 41268
2019-02-09 18:12 Marco van de Voort Note Added: 0113994
2019-02-09 18:12 Marco van de Voort Status new => resolved
2019-02-09 18:12 Marco van de Voort Fixed in Version => 3.3.1
2019-02-09 18:12 Marco van de Voort Resolution open => fixed
2019-02-09 18:12 Marco van de Voort Assigned To => Marco van de Voort