瀏覽代碼

* fix simplication of max(double,double) with both values being constants

florian 1 年之前
父節點
當前提交
15398549a4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/ninl.pas

+ 2 - 2
compiler/ninl.pas

@@ -2980,8 +2980,8 @@ implementation
                           else if (hp2.nodetype=realconstn) then
                             begin
                               { Both actual parameters are constants, so take
-                                the smaller of the two right now }
-                              if (trealconstnode(hp).value_real < trealconstnode(hp2).value_real) then
+                                the larger of the two right now }
+                              if (trealconstnode(hp).value_real > trealconstnode(hp2).value_real) then
                                 result:=crealconstnode.create(trealconstnode(hp).value_real,resultdef)
                               else
                                 result:=crealconstnode.create(trealconstnode(hp2).value_real,resultdef)