mirror of https://github.com/encounter/SDL.git
test: portable 64bit address format specifier
This commit is contained in:
parent
9d294f1fca
commit
3f25704592
|
@ -54,9 +54,9 @@ main(int argc, char *argv[])
|
||||||
int success;
|
int success;
|
||||||
Uint64 seed = 0;
|
Uint64 seed = 0;
|
||||||
if (argv[1][0] == '0' && argv[1][1] == 'x')
|
if (argv[1][0] == '0' && argv[1][1] == 'x')
|
||||||
success = SDL_sscanf(argv[1] + 2, "%llx", &seed);
|
success = SDL_sscanf(argv[1] + 2, "%"SDL_PRIx64, &seed);
|
||||||
else
|
else
|
||||||
success = SDL_sscanf(argv[1], "%llu", &seed);
|
success = SDL_sscanf(argv[1], "%"SDL_PRIu64, &seed);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid seed. Use a decimal or hexadecimal number.\n");
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid seed. Use a decimal or hexadecimal number.\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue