From defc8d98e0ddbca45ff70aeda65d613677dfc176 Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Sat, 18 May 2024 22:07:06 +0200 Subject: [PATCH] fix prange derive segfault --- src/include/ranges/prange.cc.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/include/ranges/prange.cc.h b/src/include/ranges/prange.cc.h index 96a24e0..20eb51c 100644 --- a/src/include/ranges/prange.cc.h +++ b/src/include/ranges/prange.cc.h @@ -367,9 +367,8 @@ namespace CNORXZ { Vector meta(this->size()); auto i = mRange->begin(); - SizeT j = 0; - for(const auto& p: mParts){ - meta[j++] = *(i = p); + for(SizeT j = 0; j != meta.size(); ++j){ + meta[j] = *(i = mParts[j]); } return URangeFactory( meta ).create(); }