Преглед изворни кода

* fixed writeln(<enum>) for 64 bit systems, resolves #10033

git-svn-id: trunk@10305 -
florian пре 17 година
родитељ
комит
f8c9052c21
3 измењених фајлова са 11 додато и 1 уклоњено
  1. 1 0
      .gitattributes
  2. 1 1
      rtl/inc/text.inc
  3. 9 0
      tests/webtbs/tw10033.pp

+ 1 - 0
.gitattributes

@@ -7935,6 +7935,7 @@ tests/webtbs/tw0976.pp svneol=native#text/plain
 tests/webtbs/tw10002.pp svneol=native#text/plain
 tests/webtbs/tw10009.pp svneol=native#text/plain
 tests/webtbs/tw10013.pp svneol=native#text/plain
+tests/webtbs/tw10033.pp svneol=native#text/plain
 tests/webtbs/tw10072.pp svneol=native#text/plain
 tests/webtbs/tw10203.pp svneol=native#text/plain
 tests/webtbs/tw1021.pp svneol=native#text/plain

+ 1 - 1
rtl/inc/text.inc

@@ -748,7 +748,7 @@ begin
           dec(ordinal,minvalue);
         end;
       {Get the address of the string.}
-      p:=Pshortstring((PPpointer(ord2strindex)+1+ordinal)^);
+      p:=Pshortstring((PPpointer(ord2strindex+4)+ordinal)^);
       if p=nil then
         begin
           inoutres:=107;      {Invalid ordinal value for this enum.}

+ 9 - 0
tests/webtbs/tw10033.pp

@@ -0,0 +1,9 @@
+{$apptype console}
+type Txxx = set of (one,two,three);
+
+var x : txxx;
+
+begin
+  writeln(low(x));
+  writeln(high(x));
+end.