| | |
| | | /* |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | success = SDL_sscanf(argv[1] + 2, "%llx", &seed); |
| | | else |
| | | success = SDL_sscanf(argv[1], "%llu", &seed); |
| | | if (!success) |
| | | { |
| | | if (!success) { |
| | | SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Invalid seed. Use a decimal or hexadecimal number.\n"); |
| | | return 1; |
| | | } |
| | | if (seed <= 0xffffffff) |
| | | { |
| | | if (seed <= ((Uint64)0xffffffff)) { |
| | | SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Seed must be equal or greater than 0x100000000.\n"); |
| | | return 1; |
| | | } |