From eaf6a24acf3f2aa95d1fbd7db9795f73776516a4 Mon Sep 17 00:00:00 2001 From: teejusb <5017202+teejusb@users.noreply.github.com> Date: Sat, 17 May 2025 13:03:41 -0700 Subject: [PATCH] Ensure CodeNames sizes are the same even on invalid codes --- src/CodeSet.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/CodeSet.cpp b/src/CodeSet.cpp index dff652aead..19cfb04ed1 100644 --- a/src/CodeSet.cpp +++ b/src/CodeSet.cpp @@ -25,8 +25,10 @@ void InputQueueCodeSet::Load( const RString &sType ) m_asCodeNames[c] = asBits[1]; InputQueueCode code; - if( !code.Load(CODE(sCodeName)) ) - continue; + + // Invalid codes are empty and we still want to make sure m_asCodeNames + // and m_aCodes are the same size to prevent off by ones. + code.Load(CODE(sCodeName)); m_aCodes.push_back( code ); }