Fix REG_EXPAND_SZ values handling in wxRegKey::{Copy,Format}Value()
Don't expand these string when reading them. See #16719.
This commit is contained in:
committed by
Vadim Zeitlin
parent
d00fef689f
commit
13039d5548
@@ -560,9 +560,10 @@ bool wxRegKey::CopyValue(const wxString& szValue,
|
|||||||
|
|
||||||
switch ( GetValueType(szValue) ) {
|
switch ( GetValueType(szValue) ) {
|
||||||
case Type_String:
|
case Type_String:
|
||||||
|
case Type_Expand_String:
|
||||||
{
|
{
|
||||||
wxString strVal;
|
wxString strVal;
|
||||||
return QueryValue(szValue, strVal) &&
|
return QueryRawValue(szValue, strVal) &&
|
||||||
keyDst.SetValue(valueNew, strVal);
|
keyDst.SetValue(valueNew, strVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -586,7 +587,6 @@ bool wxRegKey::CopyValue(const wxString& szValue,
|
|||||||
// occur among the application keys (supposedly created with
|
// occur among the application keys (supposedly created with
|
||||||
// this class)
|
// this class)
|
||||||
case Type_None:
|
case Type_None:
|
||||||
case Type_Expand_String:
|
|
||||||
case Type_Dword_big_endian:
|
case Type_Dword_big_endian:
|
||||||
case Type_Link:
|
case Type_Link:
|
||||||
case Type_Multi_String:
|
case Type_Multi_String:
|
||||||
@@ -1324,9 +1324,10 @@ wxString wxRegKey::FormatValue(const wxString& name) const
|
|||||||
switch ( type )
|
switch ( type )
|
||||||
{
|
{
|
||||||
case Type_String:
|
case Type_String:
|
||||||
|
case Type_Expand_String:
|
||||||
{
|
{
|
||||||
wxString value;
|
wxString value;
|
||||||
if ( !QueryValue(name, value) )
|
if ( !QueryRawValue(name, value) )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// quotes and backslashes must be quoted, linefeeds are not
|
// quotes and backslashes must be quoted, linefeeds are not
|
||||||
@@ -1375,7 +1376,6 @@ wxString wxRegKey::FormatValue(const wxString& name) const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Type_Expand_String:
|
|
||||||
case Type_Multi_String:
|
case Type_Multi_String:
|
||||||
{
|
{
|
||||||
wxString value;
|
wxString value;
|
||||||
|
Reference in New Issue
Block a user