diff --git a/packages/rtl/system.pas b/packages/rtl/system.pas index 6ae2d7a..8776002 100644 --- a/packages/rtl/system.pas +++ b/packages/rtl/system.pas @@ -365,7 +365,7 @@ function Pos(const Search, InString: String; StartAt : Integer): Integer; assemb procedure Insert(const Insertion: String; var Target: String; Index: Integer); overload; function upcase(c : char) : char; assembler; function HexStr(Val: NativeInt; cnt: byte): string; external name 'rtl.hexStr'; overload; -function binstr(val : int64; cnt : byte) : string; +function binstr(val : NativeUInt; cnt : byte) : string; procedure val(const S: String; out NI : NativeInt; out Code: Integer); overload; procedure val(const S: String; out NI : NativeUInt; out Code: Integer); overload; @@ -716,7 +716,7 @@ begin Code:=1; end; -function binstr(val : int64;cnt : byte) : string; +function binstr(val : NativeUInt;cnt : byte) : string; var i : Integer; begin diff --git a/packages/rtl/sysutils.pas b/packages/rtl/sysutils.pas index 3e55507..d637ba3 100644 --- a/packages/rtl/sysutils.pas +++ b/packages/rtl/sysutils.pas @@ -2309,7 +2309,7 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt; If Fmt[ChPos]='*' then begin - if Index=-1 then + if Index=High(byte) then ArgN:=Argpos else begin @@ -2395,7 +2395,7 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : SizeInt; begin - Index:=-1; + Index:=High(byte); Width:=-1; Prec:=-1; Value:=-1; @@ -4499,8 +4499,11 @@ function IntToHex(Value: NativeInt; Digits: integer): string; begin // Result:=HexStr(Value,Digits); // TestNegLongintHelper Failed: "ToHexString" expected: but was: <00-20000> ! Result:=''; + if Value<0 then + asm + if (Value<0) Value = 0xFFFFFFFF + Value + 1; + end; asm - if (Value<0) Value = 0xFFFFFFFF + Value + 1; Result=Value.toString(16); end; Result:=UpperCase(Result); @@ -6274,7 +6277,8 @@ Var Result:=S.IndexOfAnyUnQuoted(Separators,AQuoteStart,AQuoteEnd,StartIndex,Match) else // MVC todo: - Result:=-1; // S.IndexOfAny(Separators,StartIndex,Length,Match); + //Result:=-1; + Result:=S.IndexOfAny(Separators,StartIndex,Length,Match); end; Procedure MaybeGrow(Curlen : SizeInt);