From: Mikko Rasa Date: Wed, 3 Mar 2021 18:01:35 +0000 (+0200) Subject: Visit iteration statement components in semantically correct order X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=858d937501ef794c29fd62921e74b90580ffc965;p=libs%2Fgl.git Visit iteration statement components in semantically correct order --- 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)