diff --git a/src/nostalgia/modules/gfx/src/studio/subcommands/export-tilesheet/export-tilesheet.cpp b/src/nostalgia/modules/gfx/src/studio/subcommands/export-tilesheet/export-tilesheet.cpp index 03f510ba..31c0ce37 100644 --- a/src/nostalgia/modules/gfx/src/studio/subcommands/export-tilesheet/export-tilesheet.cpp +++ b/src/nostalgia/modules/gfx/src/studio/subcommands/export-tilesheet/export-tilesheet.cpp @@ -133,6 +133,9 @@ ox::Error cmdExportTilesheet(studio::Project &project, ox::SpanView "[-scale ]\n"); } }; + if (args.empty()) { + return {}; + } OX_REQUIRE(srcPath, clargs.getString("src-path").transformError(1, "no src path specified")); OX_REQUIRE(dstPath, clargs.getString("dst-path").transformError(2, "no dst path specified")); auto const palPath = clargs.getString("pal-path", ""); diff --git a/src/olympic/studio/applib/src/app.cpp b/src/olympic/studio/applib/src/app.cpp index 6729bc12..186d84f9 100644 --- a/src/olympic/studio/applib/src/app.cpp +++ b/src/olympic/studio/applib/src/app.cpp @@ -90,7 +90,10 @@ static ox::Error run( return ox::Error{2, "failed to load project directory"}; } Project project{*kctx.value, projectDir, projectDataDir}; - return c.func(project, args + numCmdArgs); + return c.func( + project, + args.size() > numCmdArgs ? + args + numCmdArgs : ox::SpanView{}); } } return ox::Error{1, "command not found"};