Commit a56eadc9 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Strip leading whitespace when adding a new value and not just when

replacing a current value.
parent 00cd2b2e
......@@ -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;
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 (key->value)
{
if (!strcmpW( key->value, value ))
{
TRACE(" no change needed\n" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment