mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-utils: Null-terminate the output of D3DDisassemble().
This commit is contained in:
committed by
Henri Verbeet
parent
df1c94dd60
commit
f52dc8a89a
Notes:
Henri Verbeet
2025-09-10 12:03:47 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1697
@@ -3495,9 +3495,9 @@ static void test_disassemble_shader(void)
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
code = ID3D10Blob_GetBufferPointer(blob);
|
||||
size = ID3D10Blob_GetBufferSize(blob);
|
||||
todo ok(size == strlen(code) + 1, "Expected size %u, got %u.\n",
|
||||
ok(size == strlen(code) + 1, "Expected size %u, got %u.\n",
|
||||
(unsigned int)strlen(code) + 1, (unsigned int)size);
|
||||
todo ok(code[size - 1] == 0, "Expected null termination, got %#x.\n", code[size - 1]);
|
||||
ok(code[size - 1] == 0, "Expected null termination, got %#x.\n", code[size - 1]);
|
||||
ID3D10Blob_Release(blob);
|
||||
|
||||
hr = D3DDisassemble(vs_3_0, sizeof(vs_3_0), 0, NULL, &blob);
|
||||
@@ -3513,9 +3513,9 @@ static void test_disassemble_shader(void)
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
code = ID3D10Blob_GetBufferPointer(blob);
|
||||
size = ID3D10Blob_GetBufferSize(blob);
|
||||
todo ok(size == strlen(code) + 1, "Expected size %u, got %u.\n",
|
||||
ok(size == strlen(code) + 1, "Expected size %u, got %u.\n",
|
||||
(unsigned int)strlen(code) + 1, (unsigned int)size);
|
||||
todo ok(code[size - 1] == 0, "Expected null termination, got %#x.\n", code[size - 1]);
|
||||
ok(code[size - 1] == 0, "Expected null termination, got %#x.\n", code[size - 1]);
|
||||
ID3D10Blob_Release(blob);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user