diff --git a/compiler/i8086/hlcgcpu.pas b/compiler/i8086/hlcgcpu.pas index 6e169ebaf3..ad63340f64 100644 --- a/compiler/i8086/hlcgcpu.pas +++ b/compiler/i8086/hlcgcpu.pas @@ -271,7 +271,8 @@ implementation ref.segment:=NR_GS; x86pt_far, x86pt_huge: - ref.segment:=GetNextReg(reg); + if reg<>NR_NO then + ref.segment:=GetNextReg(reg); end; end;