Commit 3f25704592a04001964e96aec760ef091fbd92a0

Christian Rauch 2021-03-26T23:46:31

test: portable 64bit address format specifier

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/test/testqsort.c b/test/testqsort.c
index 62070ef..2212f1c 100644
--- a/test/testqsort.c
+++ b/test/testqsort.c
@@ -54,9 +54,9 @@ main(int argc, char *argv[])
         int success;
         Uint64 seed = 0;
         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
-            success = SDL_sscanf(argv[1], "%llu", &seed);
+            success = SDL_sscanf(argv[1], "%"SDL_PRIu64, &seed);
         if (!success) {
             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid seed. Use a decimal or hexadecimal number.\n");
             return 1;