Fixed ASAN warning, runtime error: left shift of 160 by 24 places cannot be represented in type 'int'

(cherry picked from commit cf0d1d7234)
This commit is contained in:
Sylvain 2024-01-11 09:26:55 +01:00 committed by Sam Lantinga
parent 9fe09950f1
commit 01fa4dd9d1
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ TestGuidToString(void *arg)
SDL_GUIDToString(guid, guid_str, size);
/* Check bytes before guid_str_buf */
expected_prefix = fill_char | (fill_char << 8) | (fill_char << 16) | (fill_char << 24);
expected_prefix = fill_char | (fill_char << 8) | (fill_char << 16) | (((Uint32)fill_char) << 24);
SDL_memcpy(&actual_prefix, guid_str_buf, 4);
SDLTest_AssertCheck(expected_prefix == actual_prefix, "String buffer memory before output untouched, expected: %" SDL_PRIu32 ", got: %" SDL_PRIu32 ", at size=%d", expected_prefix, actual_prefix, size);