wineded3/vertexbuffer.c: dirtyend set to more than resource size

Christoph Bumiller e0425955 at stud3.tuwien.ac.at
Mon Jan 1 12:08:06 CST 2007


I'm not 100% sure of this but I think 
IWineD3DVertexBufferImpl->dirtyend can't be more than ->resourse.size 
and if so this is a bug (please correct me if I'm wrong); and so if 
SizeToLock is zero dirtyend should be set to resource.size in both 
cases (buffer dirty or not):

---
dlls/wined3d/vertexbuffer.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c
index 820309f..4f350bb 100644
--- a/dlls/wined3d/vertexbuffer.c
+++ b/dlls/wined3d/vertexbuffer.c
@@ -439,7 +439,7 @@ static HRESULT  WINAPI IWineD3DVertexBuf
         if(SizeToLock)
             This->dirtyend = OffsetToLock + SizeToLock;
         else
-            This->dirtyend = OffsetToLock + This->resource.size;
+            This->dirtyend = This->resource.size;
     }

     if(This->resource.allocatedMemory) {
-- 
1.4.4




More information about the wine-patches mailing list