[PATCH] advapi32/tests: Time zones should have both MUI and regular strings.

Francois Gouget fgouget at codeweavers.com
Mon May 17 09:48:40 CDT 2021


On Mon, 17 May 2021, Giovanni Mascellani wrote:
[...]
> > It would be redundant with the memcmp() that follows?
> > (or I misunderstood)
> > 
> > 
> >                  status = pRegLoadMUIStringW(subkey, L"MUI_Std", name, size,
> > &size, 0, sysdir);
> >                  ok(status == ERROR_SUCCESS, "status %d MUI_Std %s\n",
> >                     status, wine_dbgstr_w(name));
> >              }
> >              ok(!memcmp(&dtzi.StandardName, name, size), "expected %s, got
> > %s\n",
> >                 wine_dbgstr_w(name), wine_dbgstr_w(dtzi.StandardName));
> 
> Unless I am mistaken, memcmp() checks that dtzi.StandardName and name are the
> same string (or, technically, that name is a prefix of dtzi.StandardName,
> which might be longer). They could be both empty strings.

Right. I assumed that dtzi.*Name was known to be valid / cannot be 
empty. I only added the *name check for the display name because we 
don't have anything to compare it to.


> BTW, this is not really a big problem in practice. I asked just because I saw
> that in the case of Display you did this check.

I'll resubmit with the extra *name checks.


-- 
Francois Gouget <fgouget at codeweavers.com>



More information about the wine-devel mailing list