|
@@ -358,7 +358,7 @@ begin
|
|
if (len < 0) or
|
|
if (len < 0) or
|
|
(len > high(PtrInt) div 2) or
|
|
(len > high(PtrInt) div 2) or
|
|
(psrc+len < psrc) then
|
|
(psrc+len < psrc) then
|
|
- pend:=pdword(high(PtrUInt)-sizeof(dword))
|
|
|
|
|
|
+ pend:=pdword(high(PtrUInt)-PtrUInt(sizeof(dword)))
|
|
else
|
|
else
|
|
pend:=psrc+len;
|
|
pend:=psrc+len;
|
|
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
@@ -399,7 +399,7 @@ begin
|
|
if (len < 0) or
|
|
if (len < 0) or
|
|
(len > high(PtrInt) div 4) or
|
|
(len > high(PtrInt) div 4) or
|
|
(psrc+len < psrc) then
|
|
(psrc+len < psrc) then
|
|
- pend:=pqword(high(PtrUInt)-sizeof(qword))
|
|
|
|
|
|
+ pend:=pqword(high(PtrUInt)-PtrUInt(sizeof(qword)))
|
|
else
|
|
else
|
|
pend:=psrc+len;
|
|
pend:=psrc+len;
|
|
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
|
@@ -548,8 +548,7 @@ begin
|
|
inc(pptruint(psrc));
|
|
inc(pptruint(psrc));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
- if (len <= high(ptrint)) and
|
|
|
|
- (psrc+len >= psrc) then
|
|
|
|
|
|
+ if (psrc+len >= psrc) then
|
|
pend:=psrc+len
|
|
pend:=psrc+len
|
|
else
|
|
else
|
|
pend:=pword(high(ptruint)-2);
|
|
pend:=pword(high(ptruint)-2);
|
|
@@ -689,7 +688,7 @@ begin
|
|
{ simulate assembler implementations behaviour, which is expected }
|
|
{ simulate assembler implementations behaviour, which is expected }
|
|
{ fpc_pchar_to_ansistr in astrings.inc }
|
|
{ fpc_pchar_to_ansistr in astrings.inc }
|
|
if (len < 0) then
|
|
if (len < 0) then
|
|
- pend:=pbyte(high(PtrUInt)-sizeof(byte))
|
|
|
|
|
|
+ pend:=pbyte(high(PtrUInt)-PtrUInt(sizeof(byte)))
|
|
else
|
|
else
|
|
pend:=psrc+len;
|
|
pend:=psrc+len;
|
|
while (psrc<pend) and (psrc^<>0) do
|
|
while (psrc<pend) and (psrc^<>0) do
|