Michalis Kamburelis wrote: > There's a bug in Hex2Dec implementation -- it returns 0 instead of > raising EConvertError. Here's a patch: > > Index: strutils.pp > =================================================================== > --- strutils.pp (wersja 2298) > +++ strutils.pp (kopia robocza) > @@ -1156,7 +1156,7 @@ > HexStr:='$'+ S > else > HexStr:=S; > - Result:=StrTointDef(HexStr,0); > + Result:=StrToint(HexStr); > end; > > function Dec2Numb(N: Longint; Len, Base: Byte): string; > _______________________________________________
First, thanks for the reply; I applied the patch, it applied without a problem, verified the new StrUtils.pp source, all OK as per the patch. Recompiled strutils.ppu. The function still returns a zero on error. Is there another patch I need as well? This is fpc 2.0.0 on Linux, but at this level I don't think it should matter. Sorry for being dense :-( Bob -- PGP Encrypted E-Mail Prefered Public Key at: http://www.tamara-b.org/~bob/pubkey.asc . _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal