Переглянути джерело

* fixed the handling of const resourcestrings in the i8086 far data memory models

git-svn-id: trunk@27380 -
nickysn 11 роки тому
батько
коміт
9ae26316e8
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      compiler/ncgld.pas

+ 2 - 2
compiler/ncgld.pas

@@ -286,7 +286,7 @@ implementation
              begin
                 if tconstsym(symtableentry).consttyp=constresourcestring then
                   begin
-                     location_reset_ref(location,LOC_CREFERENCE,OS_ADDR,sizeof(pint));
+                     location_reset_ref(location,LOC_CREFERENCE,def_cgsize(cansistringtype),cansistringtype.size);
                      location.reference.symbol:=current_asmdata.RefAsmSymbol(make_mangledname('RESSTR',symtableentry.owner,symtableentry.name),AT_DATA);
                      { Resourcestring layout:
                          TResourceStringRecord = Packed Record
@@ -296,7 +296,7 @@ implementation
                             HashValue    : LongWord;
                           end;
                      }
-                     location.reference.offset:=sizeof(pint);
+                     location.reference.offset:=cansistringtype.size;
                   end
                 else
                   internalerror(22798);