tests: Pass the correct buffer size to vsnprintf() in vkd3d_test_push_context().

This commit is contained in:
Yuxuan Shui 2024-05-29 17:10:45 +01:00 committed by Henri Verbeet
parent 222c52380b
commit 8a459f5903
Notes: Henri Verbeet 2024-06-12 19:13:15 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/896

View File

@ -412,7 +412,7 @@ static inline void vkd3d_test_push_context(const char *fmt, ...)
{
va_start(args, fmt);
vsnprintf(vkd3d_test_state.context[vkd3d_test_state.context_count],
sizeof(vkd3d_test_state.context), fmt, args);
sizeof(*vkd3d_test_state.context), fmt, args);
va_end(args);
vkd3d_test_state.context[vkd3d_test_state.context_count][sizeof(vkd3d_test_state.context[0]) - 1] = '\0';
}