mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 11:49:23 +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;
|
||||
if distv>=0 then
|
||||
dist:=distv.uvalue
|
||||
dist:=min(distv.uvalue,high(dist))
|
||||
else
|
||||
dist:=asizeuint(-distv.svalue);
|
||||
dist:=min(asizeuint(-distv.svalue),high(dist));
|
||||
|
||||
{ optimize for size ? }
|
||||
if cs_opt_size in current_settings.optimizerswitches then
|
||||
|
Loading…
Reference in New Issue
Block a user