From e896695179f1342d2e76ea32f848e352dc341480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sun, 20 Jun 2021 14:08:56 +0200 Subject: [PATCH] Shader/LangWrite: Fix code generation with methods --- src/Nazara/Shader/LangWriter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Nazara/Shader/LangWriter.cpp b/src/Nazara/Shader/LangWriter.cpp index 6ed7d73ca..f6429f242 100644 --- a/src/Nazara/Shader/LangWriter.cpp +++ b/src/Nazara/Shader/LangWriter.cpp @@ -787,11 +787,14 @@ namespace Nz } Append("("); + bool first = true; for (std::size_t i = (method) ? 1 : 0; i < node.parameters.size(); ++i) { - if (i != 0) + if (!first) Append(", "); + first = false; + node.parameters[i]->Visit(*this); } Append(")");