Re: [PATCH v5 1/3] storage.dll16: Simplify operations in IStream16::Seek.
14 Feb
2017
14 Feb
'17
6:17 a.m.
Zebediah Figura <z.figura12(a)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(a)winehq.org
3313
Age (days ago)
3313
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard