[PATCH v5 1/3] storage.dll16: Simplify operations in IStream16::Seek.
Alexandre Julliard
julliard at winehq.org
Tue Feb 14 06:17:16 CST 2017
Zebediah Figura <z.figura12 at gmail.com> writes:
> + case SEEK_END:
> + if (offset.QuadPart > This->stde.pps_size)
> + return STG_E_INVALIDFUNCTION;
> +
> + This->offset.QuadPart = This->stde.pps_size-offset.QuadPart;
I know the previous code was doing this too, but it doesn't look right.
The offset should be added, not subtracted.
> + /* offset must be ==0 (<0 is invalid, and >0 cannot be handled
> + * right now.
> + */
> + assert(This->offset.u.HighPart == 0);
You should get rid of the assert while you are at it, that's not
appropriate for parameters passed from the application.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list