test/testqsort.c
changeset 12995 db8413ae083c
parent 12503 806492103856
equal deleted inserted replaced
12994:a9c33584781c 12995:db8413ae083c
    55         Uint64 seed = 0;
    55         Uint64 seed = 0;
    56         if (argv[1][0] == '0' && argv[1][1] == 'x')
    56         if (argv[1][0] == '0' && argv[1][1] == 'x')
    57             success = SDL_sscanf(argv[1] + 2, "%llx", &seed);
    57             success = SDL_sscanf(argv[1] + 2, "%llx", &seed);
    58         else
    58         else
    59             success = SDL_sscanf(argv[1], "%llu", &seed);
    59             success = SDL_sscanf(argv[1], "%llu", &seed);
    60         if (!success)
    60         if (!success) {
    61         {
       
    62             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid seed. Use a decimal or hexadecimal number.\n");
    61             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid seed. Use a decimal or hexadecimal number.\n");
    63             return 1;
    62             return 1;
    64         }
    63         }
    65         if (seed <= 0xffffffff)
    64         if (seed <= ((Uint64)0xffffffff)) {
    66         {
       
    67             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Seed must be equal or greater than 0x100000000.\n");
    65             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Seed must be equal or greater than 0x100000000.\n");
    68             return 1;
    66             return 1;
    69         }
    67         }
    70         SDLTest_RandomInit(&rndctx, (unsigned int)(seed >> 32), (unsigned int)(seed & 0xffffffff));
    68         SDLTest_RandomInit(&rndctx, (unsigned int)(seed >> 32), (unsigned int)(seed & 0xffffffff));
    71     }
    69     }