fix: use separate variable for evalMathExpression result
Build and Deploy / build (push) Successful in 2m43s
Build and Deploy / deploy (push) Successful in 9s

This commit is contained in:
2026-07-17 11:25:29 +00:00
parent 7dae9a0901
commit 2fceca847f
+2 -2
View File
@@ -325,12 +325,12 @@ func (h *Handler) Math(imageBase64 string) (result string, err error) {
return "", fmt.Errorf("无法识别表达式") return "", fmt.Errorf("无法识别表达式")
} }
result, err = evalMathExpression(expr) evalResult, err := evalMathExpression(expr)
if err != nil { if err != nil {
return "", err return "", err
} }
return fmt.Sprintf("%v", result), nil return fmt.Sprintf("%v", evalResult), nil
} }
func preprocessMath(img image.Image) ([]float32, error) { func preprocessMath(img image.Image) ([]float32, error) {