Strip leading whitespace when adding a new value and not just when
replacing a current value.
This commit is contained in:
parent
00cd2b2e52
commit
a56eadc92d
|
@ -993,12 +993,13 @@ static BOOL PROFILE_SetString( LPCWSTR section_name, LPCWSTR key_name,
|
|||
TRACE("(%s,%s,%s):\n",
|
||||
debugstr_w(section_name), debugstr_w(key_name), debugstr_w(value) );
|
||||
if (!key) return FALSE;
|
||||
|
||||
/* strip the leading spaces. We can safely strip \n\r and
|
||||
* friends too, they should not happen here anyway. */
|
||||
while (PROFILE_isspaceW(*value)) value++;
|
||||
|
||||
if (key->value)
|
||||
{
|
||||
/* strip the leading spaces. We can safely strip \n\r and
|
||||
* friends too, they should not happen here anyway. */
|
||||
while (PROFILE_isspaceW(*value)) value++;
|
||||
|
||||
if (!strcmpW( key->value, value ))
|
||||
{
|
||||
TRACE(" no change needed\n" );
|
||||
|
|
Loading…
Reference in New Issue