From 9ae26316e8d3b93a50212cdec2d7411b306585de Mon Sep 17 00:00:00 2001 From: nickysn Date: Sun, 30 Mar 2014 16:30:51 +0000 Subject: [PATCH] * fixed the handling of const resourcestrings in the i8086 far data memory models git-svn-id: trunk@27380 - --- compiler/ncgld.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ncgld.pas b/compiler/ncgld.pas index 32a412c935..2ae109a08e 100644 --- a/compiler/ncgld.pas +++ b/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);