소스 검색

* 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)