Explorar o código

* fixed range error in case node distance calculation

git-svn-id: trunk@9662 -
Jonas Maebe %!s(int64=17) %!d(string=hai) anos
pai
achega
03e9f652fd
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      compiler/ncgset.pas

+ 4 - 1
compiler/ncgset.pas

@@ -767,7 +767,10 @@ implementation
                      distv:=max_label+min_label
                    else
                      distv:=max_label-min_label;
-                   dist:=distv.uvalue;
+                   if (distv>=0) then
+                     dist:=distv.uvalue
+                   else
+                     dist:=-distv.svalue;
 
                    { optimize for size ? }
                    if cs_opt_size in current_settings.optimizerswitches  then