mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 09:55:50 +00:00
evr: Fix incorrect integral computation.
Note: typeof (int * unsigned) is unsigned. So: - on 64bit CPUs, where sizeof(int) = 4 < sizeof(void*) = 8, - when the result of the multiplication is supposed to be negative - there's no propagation of the negative sign from 32bit to 64 bit integers Fixes a crash in Age of Empire II. Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
a65d0e1fe7
commit
0cc4a38aae
|
@ -382,7 +382,7 @@ static HRESULT evr_copy_sample_buffer(struct evr *filter, IMediaSample *input_sa
|
|||
{
|
||||
if (SUCCEEDED(hr = IDirect3DSurface9_LockRect(surface, &locked_rect, NULL, D3DLOCK_DISCARD)))
|
||||
{
|
||||
if (src_stride < 0) src -= src_stride * (lines - 1);
|
||||
if (src_stride < 0) src += (-src_stride) * (lines - 1);
|
||||
MFCopyImage(locked_rect.pBits, locked_rect.Pitch, src, src_stride, width * 4, lines);
|
||||
IDirect3DSurface9_UnlockRect(surface);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue