mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-21 17:21:44 +00:00
Fixed %p formatting when there is following text
This commit is contained in:
@@ -220,6 +220,12 @@ static int stdlib_snprintf(void *arg)
|
||||
SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text);
|
||||
SDLTest_AssertCheck(result == SDL_strlen(expected), "Check result value, expected: %d, got: %d", (int)SDL_strlen(expected), result);
|
||||
|
||||
result = SDL_snprintf(text, sizeof(text), "A %p B", (void *)0x1234abcd);
|
||||
expected = "A 0x1234abcd B";
|
||||
SDLTest_AssertPass("Call to SDL_snprintf(text, sizeof(text), \"A %%p B\", 0x1234abcd)");
|
||||
SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text);
|
||||
SDLTest_AssertCheck(result == SDL_strlen(expected), "Check result value, expected: %d, got: %d", (int)SDL_strlen(expected), result);
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user