From 4ade34bc024442311ac3eb055d1389bbbbb32bf3 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 5 Sep 2022 02:35:40 +0900 Subject: [PATCH] internal/shaderir: bug fix: wrong argument check on pow Closes #2304 --- internal/shader/expr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/shader/expr.go b/internal/shader/expr.go index 60fbcb2c4..f1f50656e 100644 --- a/internal/shader/expr.go +++ b/internal/shader/expr.go @@ -617,7 +617,7 @@ func (cs *compileState) parseExpr(block *block, fname string, expr ast.Expr, mar t = argts[0] } - case shaderir.Atan2, shaderir.Mod, shaderir.Min, shaderir.Max, shaderir.Step, shaderir.Distance, shaderir.Dot, shaderir.Cross, shaderir.Reflect: + case shaderir.Atan2, shaderir.Pow, shaderir.Mod, shaderir.Min, shaderir.Max, shaderir.Step, shaderir.Distance, shaderir.Dot, shaderir.Cross, shaderir.Reflect: // 2 arguments if len(args) != 2 { cs.addError(e.Pos(), fmt.Sprintf("number of %s's arguments must be 2 but %d", callee.BuiltinFunc, len(args)))