diff --git a/compiler/symtable.pas b/compiler/symtable.pas index fd6c2b93aa..458584591a 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -1956,7 +1956,7 @@ implementation { find the last shadowfield whose offset <= the current field's offset } while (tllvmshadowsymtableentry(symdeflist[shadowindex]).fieldoffset=tfieldvarsym(equivst.symlist[i]).fieldoffset) do + (tllvmshadowsymtableentry(symdeflist[shadowindex+1]).fieldoffset<=tfieldvarsym(equivst.symlist[i]).fieldoffset) do inc(shadowindex); { set the field number and potential offset from that field (in case } { of overlapping variants) }