mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 17:49:13 +02:00
Avoid range check error inside tcgcasenode.pass_generate_code method
This commit is contained in:
parent
86c097086a
commit
c06a3f2ca3
@ -1251,9 +1251,9 @@ implementation
|
|||||||
|
|
||||||
distv:=max_label-min_label;
|
distv:=max_label-min_label;
|
||||||
if distv>=0 then
|
if distv>=0 then
|
||||||
dist:=distv.uvalue
|
dist:=min(distv.uvalue,high(dist))
|
||||||
else
|
else
|
||||||
dist:=asizeuint(-distv.svalue);
|
dist:=min(asizeuint(-distv.svalue),high(dist));
|
||||||
|
|
||||||
{ optimize for size ? }
|
{ optimize for size ? }
|
||||||
if cs_opt_size in current_settings.optimizerswitches then
|
if cs_opt_size in current_settings.optimizerswitches then
|
||||||
|
Loading…
Reference in New Issue
Block a user