From 461c8fb09f514142cf9dfcd4382176f6818d06b0 Mon Sep 17 00:00:00 2001 From: micha Date: Sun, 9 Mar 2008 21:53:46 +0000 Subject: [PATCH] * fix enum rtti info alignment for proper alignment required archs git-svn-id: trunk@10471 - --- rtl/inc/text.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rtl/inc/text.inc b/rtl/inc/text.inc index 4d54e4e5fb..ec63c336e1 100644 --- a/rtl/inc/text.inc +++ b/rtl/inc/text.inc @@ -724,7 +724,7 @@ type Ptypeinfo=^Ttypeinfo; var p:Pstring; - l,h,m:cardinal; + l,h,m,offset:cardinal; sorted_array:^Tsorted_array; s:string; @@ -740,7 +740,11 @@ begin if Pcardinal(ord2strindex)^=0 then begin {The compiler did generate a lookup table.} - with Penuminfo(Pbyte(typinfo)+2+length(Ptypeinfo(typinfo)^.name))^ do + offset:=2+length(Ptypeinfo(typinfo)^.name); +{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT} + offset:=(offset+sizeof(sizeint)-1) and not (sizeof(sizeint)-1); +{$endif} + with Penuminfo(Pbyte(typinfo)+offset)^ do begin if (ordinalmaxvalue) then begin