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

* fixed compile time conversion of qword constants to floats
(mantis #12051)

git-svn-id: branches/fixes_2_2@11705 -

Jonas Maebe пре 17 година
родитељ
комит
bcd569b60a
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      compiler/ncnv.pas

+ 5 - 1
compiler/ncnv.pas

@@ -1155,7 +1155,11 @@ implementation
         result:=nil;
         if left.nodetype=ordconstn then
          begin
-           rv:=tordconstnode(left).value;
+           if is_signed(left.resultdef) or
+              not is_64bitint(left.resultdef) then
+             rv:=tordconstnode(left).value
+           else
+             rv:=qword(tordconstnode(left).value);
            if is_currency(resultdef) then
              rv:=rv*10000.0
            else if is_currency(left.resultdef) then