From: Joerg Rueppel <sharky-x@gmx.net> Co-authored-by: Matteo Bruni <matteo.mystral@gmail.com> --- dlls/d3dxof/parsing.c | 4 ++-- dlls/d3dxof/tests/d3dxof.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c index 12123f41429..2e89b42a8d9 100644 --- a/dlls/d3dxof/parsing.c +++ b/dlls/d3dxof/parsing.c @@ -1371,8 +1371,8 @@ BOOL parse_object(parse_buffer * buf) * refcounting and allocation decisions. Must be >= 2. */ if (!check_buffer(buf, sizeof(DWORD))) return FALSE; - *(DWORD *)(buf->pdata + buf->cur_pos_data) = 2; - buf->cur_pos_data += 4; + *(DWORD *)(buf->pdata + buf->cur_pos_data) = 0x55555555; + buf->cur_pos_data += sizeof(DWORD); buf->pxo->pos_data = buf->cur_pos_data; buf->pxo->ptarget = NULL; diff --git a/dlls/d3dxof/tests/d3dxof.c b/dlls/d3dxof/tests/d3dxof.c index e085c1f9bfa..990c1e3bd80 100644 --- a/dlls/d3dxof/tests/d3dxof.c +++ b/dlls/d3dxof/tests/d3dxof.c @@ -366,7 +366,7 @@ static char object_complex[] = "3;;;, 0;;;, 1;;;, 2;;;,\n" "3;;;, 1;;;, 2;;;, 3;;;,\n" "3;;;, 3;;;, 1;;;, 2;;;,\n" -/* child object for heap alloc test */ +/* child object for memory layout test */ "Vector{0.0;;;, 0.0;;;, 0.0;;;}\n" "}\n"; @@ -1059,10 +1059,8 @@ static void test_getdata_memory_layout(void) todo_wine ok(distance > root_size + child_size, "Unexpected distance %Iu.\n", distance); pre_data = *((void **)root_ptr - 1); - trace("root_ptr %p, pre_data %p\n", root_ptr, pre_data); ok(*(DWORD *)((BYTE *)root_ptr - 4) >= 2, "Unexpected value %#lx at root_ptr-4.\n", *(DWORD *)((BYTE *)root_ptr - 4)); pre_data = *((void **)child_ptr - 1); - trace("child_ptr %p, pre_data %p\n", child_ptr, pre_data); hr = IDirectXFileData_GetData(root_data, NULL, &root_size, &root_ptr2); ok(hr == DXFILE_OK, "Unexpected hr %#lx.\n", hr); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10278