mirror of
https://github.com/red031000/nitrogfx.git
synced 2025-06-18 21:25:38 -04:00
Merge pull request #6 from lhearachel/patch-2
Patch -palIndex option check
This commit is contained in:
commit
492688b25c
2
main.c
2
main.c
@ -288,7 +288,7 @@ void HandleNtrToPngCommand(char *inputPath, char *outputPath, int argc, char **a
|
||||
if (!ParseNumber(argv[i], NULL, 10, &options.palIndex))
|
||||
FATAL_ERROR("Failed to parse palette index.\n");
|
||||
|
||||
if (options.width < 1)
|
||||
if (options.palIndex < 1)
|
||||
FATAL_ERROR("Palette index must be positive.\n");
|
||||
}
|
||||
else if (strcmp(option, "-width") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user