Fix integer overflow in 1D buffer image tests (#2092)

This commit is contained in:
Qichao Gu
2024-10-16 01:01:36 +08:00
committed by GitHub
parent 2998463eb4
commit 9f54727924
5 changed files with 5 additions and 5 deletions

View File

@@ -171,7 +171,7 @@ int test_fill_image_set_1D_buffer(cl_device_id device, cl_context context,
do
{
imageInfo.width =
(size_t)random_log_in_range(16, (int)maxWidth / 32, seed);
(size_t)random_log_in_range(16, (int)(maxWidth / 32), seed);
imageInfo.rowPitch = imageInfo.width * pixelSize + rowPadding;