From 0657f1120cd845a997e31325fec7ce2b0b7900bf Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 22 Nov 2021 15:50:18 +0100 Subject: [PATCH] aspects: Fix off-by-one error when printing subcontrols (#151) --- src/common/QskAspect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/QskAspect.cpp b/src/common/QskAspect.cpp index 1614bba8..a45febbb 100644 --- a/src/common/QskAspect.cpp +++ b/src/common/QskAspect.cpp @@ -102,7 +102,7 @@ QByteArray QskAspect::subControlName( Subcontrol subControl ) const auto& names = qskAspectRegistry->subControlNames; const int index = subControl; - if ( index > 0 && index < names.size() ) + if ( index > 0 && index <= names.size() ) return names[ index - 1 ]; return QByteArray();