ATL creates wrong registry entries
Jacek Caban
jack at itma.pwr.wroc.pl
Wed Nov 16 10:01:14 CST 2005
Hi Cihan,
Cihan Altinay wrote:
> Ok, I looked into it again and found a solution. The problem
> was that the '{' character was treated as a separator which
> is generally correct. But it seems that key names like the one
> mentioned above are allowed without single quotes around them.
> The attached patch doesn't look very nice but solves the problem.
> I am aware that it implies that there must be whitespace between
> '{' and the next character if it _is_ a separator. But it seems
> the same condition is already true for '}' in the code.
> Could Jacek or somebody else who worked on this file comment on
> this and tell me if I can submit the patch?
You're right. I've tested it and '{' followed by non-whitespace should
be interpreted as string, not a separator. Your patch is correct, but
removing *iter == '{' test from if has the same result and is cleaner.
Then we need to make sure that we have a single '{' character in one
more place. Could you test the attached patch?
Thanks,
Jacek
-------------- next part --------------
Index: dlls/atl/registrar.c
===================================================================
RCS file: /home/wine/wine/dlls/atl/registrar.c,v
retrieving revision 1.15
diff -u -p -r1.15 registrar.c
--- dlls/atl/registrar.c 12 Sep 2005 20:29:16 -0000 1.15
+++ dlls/atl/registrar.c 16 Nov 2005 15:58:25 -0000
@@ -125,7 +125,7 @@ static HRESULT get_word(LPCOLESTR *str,
return S_OK;
}
- if(*iter == '{' || *iter == '}' || *iter == '=') {
+ if(*iter == '}' || *iter == '=') {
strbuf_write(iter++, buf, 1);
}else if(*iter == '\'') {
iter2 = ++iter;
@@ -321,7 +321,7 @@ static HRESULT do_process_key(LPCOLESTR
break;
}
- if(key_type != IS_VAL && key_type != DO_DELETE && *iter == '{') {
+ if(key_type != IS_VAL && key_type != DO_DELETE && *iter == '{' && !iter[1]) {
hres = get_word(&iter, buf);
if(FAILED(hres))
break;
More information about the wine-devel
mailing list