From: Vadim Zeitlin Date: Wed, 20 Dec 2000 14:41:17 +0000 (+0000) Subject: fix for wxRegConfig::GetNextGroup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/09f50eb328c99b2fff8bc43c0c7a52dfb206a123 fix for wxRegConfig::GetNextGroup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index 404fb0d2d2..9853728ea5 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -217,13 +217,15 @@ bool wxRegConfig::GetNextGroup(wxString& str, long& lIndex) const // are we already enumerating local entries? if ( m_keyGlobal.IsOpened() && !IS_LOCAL_INDEX(lIndex) ) { // try to find a global entry which doesn't appear locally - do { - if ( !m_keyGlobal.GetNextKey(str, lIndex) ) { - // no more global entries - lIndex |= LOCAL_MASK; - break; + while ( m_keyGlobal.GetNextKey(str, lIndex) ) { + if ( !m_keyLocal.HasSubKey(str) ) { + // ok, found one - return it + return TRUE; } - } while( m_keyLocal.HasSubKey(str) ); + } + + // no more global entries + lIndex |= LOCAL_MASK; } // much easier with local entries: get the next one we find