You are not logged in.
Pages: 1
Hi Arnaud,
function GetCardinalDef(P: PUTF8Char; Default: PtrUInt): PtrUInt;
var c: byte;
begin
result := Default;
if P=nil then
exit;
c := byte(P^);
repeat
if c=0 then
exit;
if c>ord(' ') then
break;
inc(P);
c := byte(P^);
until false;
dec(c,48); // <--------------------------------------
c := byte(P^)-48;
if c>9 then
exit;
result := c;
repeat
inc(P);
c := byte(P^)-48;
if c>9 then
break;
result := result*10+PtrUInt(c);
until false;
end;
I guess, that one may be just removed and fine it is.
Offline
Pages: 1