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

Merge branch 'feature/eta_2.6.9' into debug

hsun пре 6 дана
родитељ
комит
4161264d4e
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      services/smart_report.go

+ 2 - 2
services/smart_report.go

@@ -664,10 +664,10 @@ func calculateReportPdfHeight(width int, freeRatio string) (height int, err erro
 		err = fmt.Errorf("布局比例有误, %s", freeRatio)
 		return
 	}
-	if n <= 0 {
+	if m <= 0 {
 		err = fmt.Errorf("布局比例有误, %s", freeRatio)
 		return
 	}
-	height = int(math.Round(float64(width) * m / n))
+	height = int(math.Round(float64(width) * n / m))
 	return
 }