]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix an incorrect loop in UnusedVariableRemover
authorMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 10:58:57 +0000 (13:58 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 10:58:57 +0000 (13:58 +0300)
source/glsl/optimize.cpp

index 16e43a9e44c6d689a13f92f8655e0b258bb0d5e8..55e5da5fddeec0896cbd52b087a87bf928da305d 100644 (file)
@@ -1263,7 +1263,7 @@ void UnusedVariableRemover::record_assignment(const Assignment::Target &target,
        /* An assignment to the target hides any assignments to the same target or
        its subfields. */
        VariableInfo &var_info = variables[target.declaration];
-       for(unsigned i=0; i<var_info.assignments.size(); ++i)
+       for(unsigned i=0; i<var_info.assignments.size(); )
        {
                const Assignment::Target &t = var_info.assignments[i]->target;