* some fixes for 8 Bit CPUs

This commit is contained in:
florian 2022-01-19 22:03:09 +01:00
parent bd104270ae
commit 02abad58d8

View File

@ -1509,12 +1509,12 @@ end;
end; end;
If (u>=base) or If (u>=base) or
(ValUInt(UpperLimit-u) div ValUInt(Base)<fpc_val_longword_shortstr) then (LongWord(UpperLimit-u) div LongWord(Base)<fpc_val_longword_shortstr) then
begin begin
fpc_val_longword_shortstr:=0; fpc_val_longword_shortstr:=0;
exit; exit;
end; end;
fpc_val_longword_shortstr:=fpc_val_longword_shortstr*ValUInt(base) + u; fpc_val_longword_shortstr:=fpc_val_longword_shortstr*base + u;
inc(code); inc(code);
end; end;
code := 0; code := 0;
@ -1607,12 +1607,12 @@ end;
end; end;
If (u>=base) or If (u>=base) or
(ValUInt(UpperLimit-u) div ValUInt(Base)<fpc_val_word_shortstr) then (Word(UpperLimit-u) div Word(Base)<fpc_val_word_shortstr) then
begin begin
fpc_val_word_shortstr:=0; fpc_val_word_shortstr:=0;
exit; exit;
end; end;
fpc_val_word_shortstr:=fpc_val_word_shortstr*ValUInt(base) + u; fpc_val_word_shortstr:=fpc_val_word_shortstr*base + u;
inc(code); inc(code);
end; end;
code := 0; code := 0;