From d9a546a5cc64ec7ab416a051581858aabffc5293 Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Sat, 23 Mar 2024 20:52:57 +0100 Subject: [PATCH] fix yrange at() --- src/lib/ranges/yrange.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/ranges/yrange.cc b/src/lib/ranges/yrange.cc index ed0e40f..1998f1a 100644 --- a/src/lib/ranges/yrange.cc +++ b/src/lib/ranges/yrange.cc @@ -64,10 +64,16 @@ namespace CNORXZ { mLex = 0; IB::mPos = 0; + bool outOfScope = false; for(SizeT i = 0; i != dim(); ++i){ + outOfScope |= mIs[i]->lex() >= mIs[i]->lmax().val(); mLex += mIs[i]->lex() * mLexFormat[i].val(); IB::mPos += mIs[i]->pos() * mFormat[i].val(); } + if(outOfScope){ + IB::mPos = pmax().val(); + mLex = lmax().val(); + } } inline void YIndex::up(SizeT i)