diff --git a/src/openrct2/cmdline/SpriteCommands.cpp b/src/openrct2/cmdline/SpriteCommands.cpp index c83beb853c..241e53438d 100644 --- a/src/openrct2/cmdline/SpriteCommands.cpp +++ b/src/openrct2/cmdline/SpriteCommands.cpp @@ -40,9 +40,12 @@ static exitcode_t HandleSprite(CommandLineArgEnumerator *argEnumerator); const CommandLineCommand CommandLine::SpriteCommands[] { // Main commands - DefineCommand("details", " [idx]", SpriteOptions, HandleSprite), - DefineCommand("export", " ", SpriteOptions, HandleSprite), - DefineCommand("build", " [silent]", SpriteOptions, HandleSprite), + DefineCommand("append", " ", SpriteOptions, HandleSprite), + DefineCommand("build", " [silent]", SpriteOptions, HandleSprite), + DefineCommand("create", "", SpriteOptions, HandleSprite), + DefineCommand("details", " [idx]", SpriteOptions, HandleSprite), + DefineCommand("export", " ", SpriteOptions, HandleSprite), + DefineCommand("exportall", " ", SpriteOptions, HandleSprite), CommandTableEnd }; diff --git a/src/openrct2/cmdline_sprite.c b/src/openrct2/cmdline_sprite.c index 261789bee1..4310cc31a5 100644 --- a/src/openrct2/cmdline_sprite.c +++ b/src/openrct2/cmdline_sprite.c @@ -527,16 +527,16 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc) return -1; } - if (!platform_ensure_directory_exists(argv[2])){ + safe_strcpy(outputPath, argv[2], MAX_PATH); + path_end_with_separator(outputPath, MAX_PATH); + + if (!platform_ensure_directory_exists(outputPath)){ fprintf(stderr, "Unable to create directory.\n"); return -1; } - sint32 maxIndex = (sint32)spriteFileHeader.num_entries; sint32 numbers = (sint32)floor(log(maxIndex)); - - safe_strcpy(outputPath, argv[2], MAX_PATH); size_t pathLen = strlen(outputPath); if (pathLen >= (size_t)(MAX_PATH - numbers - 5)) {