X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/02569ba8eb3fbb43b136cc417ecf0ee774ae6205..564b260950a9a370bf9231f7432caced5156ba1b:/src/msw/registry.cpp diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index f40064ae68..4717b97ebb 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -589,6 +589,7 @@ bool wxRegKey::QueryValue(const char *szValue, wxString& strValue) const RegString pBuf = (RegString)strValue.GetWriteBuf(dwSize); m_dwLastError = RegQueryValueEx(m_hKey, szValue, RESERVED, &dwType, pBuf, &dwSize); + strValue.UngetWriteBuf(); if ( m_dwLastError == ERROR_SUCCESS ) { // check that it was the right type wxASSERT_MSG( dwType == REG_SZ, @@ -602,6 +603,7 @@ bool wxRegKey::QueryValue(const char *szValue, wxString& strValue) const wxASSERT( IsEmpty(szValue) ); m_dwLastError = RegQueryValue(m_hKey, 0, strValue.GetWriteBuf(256), &l); + strValue.UngetWriteBuf(); if ( m_dwLastError == ERROR_SUCCESS ) return TRUE; #endif //WIN16/32