kernel32: Enhance EndUpdateResource

Andrey Turkin andrey.turkin at gmail.com
Sun Jul 18 05:24:14 CDT 2010


On Sunday 18 July 2010 00:26:36 Henri Verbeet wrote:
> On 17 July 2010 09:06, Andrey Turkin <andrey.turkin at gmail.com> wrote:
> > +    if (nt->OptionalHeader.FileAlignment <= 0)
> 
> I can't comment much on the changes themselves, but FileAlignment is
> unsigned, so can't be < 0.

Original function has this check just before that added line:

if (nt->OptionalHeader.SectionAlignment <= 0)
{
      ERR("invalid section alignment %04x\n", nt->OptionalHeader.SectionAlignment);
      goto done;
}

So I've added something similar. The point here is to check alignments are positive; <= works just as well as !=, and is describes "not positive" condition better than !=.



More information about the wine-devel mailing list