Commit 218de935 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Fix a sign mistake in the code creating the sorted attrib.

parent a0127f2e
...@@ -175,7 +175,7 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_SetDeclaration(IWineD3DVerte ...@@ -175,7 +175,7 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_SetDeclaration(IWineD3DVerte
(This->swizzled_attribs[j].usage == This->pDeclarationWine[i].Usage && (This->swizzled_attribs[j].usage == This->pDeclarationWine[i].Usage &&
This->swizzled_attribs[j].idx > This->pDeclarationWine[i].UsageIndex)) { This->swizzled_attribs[j].idx > This->pDeclarationWine[i].UsageIndex)) {
memmove(&This->swizzled_attribs[j + 1], &This->swizzled_attribs[j], memmove(&This->swizzled_attribs[j + 1], &This->swizzled_attribs[j],
sizeof(This->swizzled_attribs) - (sizeof(This->swizzled_attribs[0]) * (j - 1))); sizeof(This->swizzled_attribs) - (sizeof(This->swizzled_attribs[0]) * (j + 1)));
break; break;
} }
} }
......
...@@ -336,7 +336,7 @@ static inline void find_swizzled_attribs(IWineD3DVertexDeclaration *declaration, ...@@ -336,7 +336,7 @@ static inline void find_swizzled_attribs(IWineD3DVertexDeclaration *declaration,
oldswizzles[i].usage == This->swizzled_attribs[j].usage && oldswizzles[i].usage == This->swizzled_attribs[j].usage &&
oldswizzles[i].idx > This->swizzled_attribs[j].idx)) { oldswizzles[i].idx > This->swizzled_attribs[j].idx)) {
memmove(&This->swizzled_attribs[j + 1], &This->swizzled_attribs[j], memmove(&This->swizzled_attribs[j + 1], &This->swizzled_attribs[j],
sizeof(This->swizzled_attribs) - (sizeof(This->swizzled_attribs[0]) * (j - 1))); sizeof(This->swizzled_attribs) - (sizeof(This->swizzled_attribs[0]) * (j + 1)));
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment