浏览代码

Patched (allowed case of) empty section reference

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6593 8c9fc860-2736-0410-a75d-ab315db34111
felixf 9 年之前
父节点
当前提交
5b614be365
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      source/FoxTRMBackend.Mod

+ 1 - 1
source/FoxTRMBackend.Mod

@@ -1092,7 +1092,7 @@ TYPE
 			sectionName := vop.symbol;
 			Resolve(vop);
 			section := vop.resolved; offset := vop.offset;
-			IF (section # NIL) & (section(IntermediateCode.Section).resolved # NIL) & (section(IntermediateCode.Section).resolved.os.fixed) THEN
+			IF (vop.symbolOffset > 0) & (section # NIL) & (section(IntermediateCode.Section).resolved # NIL) & (section(IntermediateCode.Section).resolved.os.fixed) THEN
 				INC(offset, section(IntermediateCode.Section).resolved.os.alignment);
 				INC(offset, section(IntermediateCode.Section).instructions[vop.symbolOffset].pc);
 				sectionName.name := "";