From 34d956d6890ce7070741667d4864fa798883da72 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 10 Oct 2021 11:51:54 +0300 Subject: [PATCH] Fix the type of a loop variable This was a transcription error introduced in e9a898f. --- source/glsl/spirv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glsl/spirv.cpp b/source/glsl/spirv.cpp index 233d1548..edbdf635 100644 --- a/source/glsl/spirv.cpp +++ b/source/glsl/spirv.cpp @@ -570,7 +570,7 @@ void SpirVGenerator::generate_composite_access(TypeDeclaration &result_type) throw internal_error("assignment to temporary composite"); else { - for(unsigned i: r_composite_chain) + for(unsigned &i: r_composite_chain) for(auto j=constant_ids.begin(); (i>=0x400000 && j!=constant_ids.end()); ++j) if(j->second==(i&0x3FFFFF)) i = j->first.int_value; -- 2.43.0