소스 검색

* fix writing of enums for 64 bit platforms that do not require proper alignment

git-svn-id: trunk@10742 -
tom_at_work 17 년 전
부모
커밋
33bba100fc
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      rtl/inc/text.inc

+ 4 - 0
rtl/inc/text.inc

@@ -754,7 +754,11 @@ begin
           dec(ordinal,minvalue);
         end;
       {Get the address of the string.}
+{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}      
       p:=Pshortstring((PPpointer(ord2strindex+align(sizeof(longint), sizeof(ptrint)))+ordinal)^);
+{$else}
+      p:=Pshortstring((PPpointer(ord2strindex+sizeof(longint))+ordinal)^);
+{$endif}
       if p=nil then
         begin
           inoutres:=107;      {Invalid ordinal value for this enum.}