adding " " value irregularities
Aric Stewart
aric at codeweavers.com
Sun May 2 21:55:01 CDT 2004
When adding a " " value we failed to strip the " " when adding.
resulting in a value=" " value in the profile file. If the value is then
read without closing the file a " " value is given, however if the file
is closed and reopened we properly strip the whitespace and "" occurs.
So strip leading whitespace when adding a new value and not just when
replacing a current value.
-aric
-------------- next part --------------
Index: dlls/kernel/profile.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/profile.c,v
retrieving revision 1.9
diff -u -w -r1.9 profile.c
--- dlls/kernel/profile.c 8 Apr 2004 19:06:54 -0000 1.9
+++ dlls/kernel/profile.c 3 May 2004 02:52:24 -0000
@@ -994,12 +994,11 @@
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" );
More information about the wine-patches
mailing list