From ed72843dece85b1ec3852ce4a94ad1f5d44351b1 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 7 Nov 2018 23:04:42 +0200 Subject: [PATCH] - fixed undefined behavior when grouping sections The current group should not be accessed by reference because its container can be reallocated during iteration https://forum.zdoom.org/viewtopic.php?t=62487 --- src/r_data/r_sections.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_data/r_sections.cpp b/src/r_data/r_sections.cpp index fcc273d33..9186a13a1 100644 --- a/src/r_data/r_sections.cpp +++ b/src/r_data/r_sections.cpp @@ -565,7 +565,7 @@ public: // Don't use iterators here. These arrays are modified inside. for (unsigned j = 0; j < build.Size(); j++) { - auto ¤t = build[j]; + auto current = build[j]; for (int i = 0; i < (int)workingSet.Size(); i++) { // Are both sections close together?