Re: LockRect Problem

2007-03-12 Thread Erich Hoover
On 3/12/07, H. Verbeet <[EMAIL PROTECTED]> wrote: On 12/03/07, Erich Hoover <[EMAIL PROTECTED]> wrote: > I think that the allocated memory should be the size of the resource > multiplied by 4 (instead of adding 4). What makes you think that? Just that (pLockedRect->Pitch * pRect->top) with pR

Re: LockRect Problem

2007-03-12 Thread H. Verbeet
On 12/03/07, Erich Hoover <[EMAIL PROTECTED]> wrote: your explanation in bugzilla makes sense. Will you be taking care of this, or should I write up a patch with the divide by 4 and a bounds check? If you're willing to write a patch for this, sure. The patch should apply to DXT2-DXT5, and the

Re: LockRect Problem

2007-03-12 Thread Stefan Dösinger
Am Montag 12 März 2007 06:04 schrieb Erich Hoover: > I'm looking into a problem that causes Supreme Commander to segfault (Bug > #7643 ) and I believe I may > have run into a problem with IWineD3DSurfaceImpl_LockRect. I believe the > > problem is a typo

Re: LockRect Problem

2007-03-12 Thread H. Verbeet
On 12/03/07, Erich Hoover <[EMAIL PROTECTED]> wrote: I think that the allocated memory should be the size of the resource multiplied by 4 (instead of adding 4). What makes you think that? IIRC the +4 there is for dodgy applications reading just past the end of the surface, but that line could d

LockRect Problem

2007-03-12 Thread Erich Hoover
I'm looking into a problem that causes Supreme Commander to segfault (Bug #7643 ) and I believe I may have run into a problem with IWineD3DSurfaceImpl_LockRect. I believe the problem is a typo in the line: This->resource.allocatedMemory = HeapAlloc(G