From 858d937501ef794c29fd62921e74b90580ffc965 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 3 Mar 2021 20:01:35 +0200 Subject: [PATCH] Visit iteration statement components in semantically correct order --- source/glsl/visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glsl/visitor.cpp b/source/glsl/visitor.cpp index 3d832c73..fa6e614c 100644 --- a/source/glsl/visitor.cpp +++ b/source/glsl/visitor.cpp @@ -102,9 +102,9 @@ void TraversingVisitor::visit(Iteration &iter) iter.init_statement->visit(*this); if(iter.condition) iter.condition->visit(*this); + iter.body.visit(*this); if(iter.loop_expression) iter.loop_expression->visit(*this); - iter.body.visit(*this); } void TraversingVisitor::visit(Passthrough &pass) -- 2.45.2