a couple of missing calls to UngetWriteBuf() added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -589,6 +589,7 @@ bool wxRegKey::QueryValue(const char *szValue, wxString& strValue) const
|
|||||||
RegString pBuf = (RegString)strValue.GetWriteBuf(dwSize);
|
RegString pBuf = (RegString)strValue.GetWriteBuf(dwSize);
|
||||||
m_dwLastError = RegQueryValueEx(m_hKey, szValue, RESERVED,
|
m_dwLastError = RegQueryValueEx(m_hKey, szValue, RESERVED,
|
||||||
&dwType, pBuf, &dwSize);
|
&dwType, pBuf, &dwSize);
|
||||||
|
strValue.UngetWriteBuf();
|
||||||
if ( m_dwLastError == ERROR_SUCCESS ) {
|
if ( m_dwLastError == ERROR_SUCCESS ) {
|
||||||
// check that it was the right type
|
// check that it was the right type
|
||||||
wxASSERT_MSG( dwType == REG_SZ,
|
wxASSERT_MSG( dwType == REG_SZ,
|
||||||
@@ -602,6 +603,7 @@ bool wxRegKey::QueryValue(const char *szValue, wxString& strValue) const
|
|||||||
wxASSERT( IsEmpty(szValue) );
|
wxASSERT( IsEmpty(szValue) );
|
||||||
|
|
||||||
m_dwLastError = RegQueryValue(m_hKey, 0, strValue.GetWriteBuf(256), &l);
|
m_dwLastError = RegQueryValue(m_hKey, 0, strValue.GetWriteBuf(256), &l);
|
||||||
|
strValue.UngetWriteBuf();
|
||||||
if ( m_dwLastError == ERROR_SUCCESS )
|
if ( m_dwLastError == ERROR_SUCCESS )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#endif //WIN16/32
|
#endif //WIN16/32
|
||||||
|
Reference in New Issue
Block a user