mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 13:09:22 +02:00
* fix writing of enums for 64 bit platforms that do not require proper alignment
git-svn-id: trunk@10742 -
This commit is contained in:
parent
553b524c0a
commit
33bba100fc
@ -754,7 +754,11 @@ begin
|
|||||||
dec(ordinal,minvalue);
|
dec(ordinal,minvalue);
|
||||||
end;
|
end;
|
||||||
{Get the address of the string.}
|
{Get the address of the string.}
|
||||||
|
{$ifdef FPC_REQUIRES_PROPER_ALIGNMENT}
|
||||||
p:=Pshortstring((PPpointer(ord2strindex+align(sizeof(longint), sizeof(ptrint)))+ordinal)^);
|
p:=Pshortstring((PPpointer(ord2strindex+align(sizeof(longint), sizeof(ptrint)))+ordinal)^);
|
||||||
|
{$else}
|
||||||
|
p:=Pshortstring((PPpointer(ord2strindex+sizeof(longint))+ordinal)^);
|
||||||
|
{$endif}
|
||||||
if p=nil then
|
if p=nil then
|
||||||
begin
|
begin
|
||||||
inoutres:=107; {Invalid ordinal value for this enum.}
|
inoutres:=107; {Invalid ordinal value for this enum.}
|
||||||
|
Loading…
Reference in New Issue
Block a user