mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 17:06:04 +02:00
Avoid range check error in AddNormalStringDef
This commit is contained in:
parent
b4d4c30a45
commit
637c34571e
@ -1630,12 +1630,14 @@ implementation
|
|||||||
slen : asizeuint;
|
slen : asizeuint;
|
||||||
arr : tasmlabel;
|
arr : tasmlabel;
|
||||||
begin
|
begin
|
||||||
|
{$push}
|
||||||
|
{$R-}{$Q-}
|
||||||
{ fix length of openshortstring }
|
{ fix length of openshortstring }
|
||||||
slen:=aword(def.len);
|
slen:=aword(def.len);
|
||||||
if (slen=0) or
|
if (slen=0) or
|
||||||
(slen>maxlen) then
|
(slen>maxlen) then
|
||||||
slen:=maxlen;
|
slen:=maxlen;
|
||||||
|
{$pop}
|
||||||
{ create a structure with two elements }
|
{ create a structure with two elements }
|
||||||
if not(tf_dwarf_only_local_labels in target_info.flags) then
|
if not(tf_dwarf_only_local_labels in target_info.flags) then
|
||||||
current_asmdata.getglobaldatalabel(arr)
|
current_asmdata.getglobaldatalabel(arr)
|
||||||
|
Loading…
Reference in New Issue
Block a user