mirror of
https://github.com/armory3d/armorpaint.git
synced 2026-10-02 02:54:34 +08:00
Fix export CLI argument bounds
This commit is contained in:
@@ -45,7 +45,7 @@ void args_parse() {
|
||||
else if (path_is_texture(current_arg)) {
|
||||
args_asset_path = args_path(current_arg);
|
||||
}
|
||||
else if (string_equals(current_arg, "--export-textures") && (i + 3) <= iron_get_arg_count()) {
|
||||
else if (string_equals(current_arg, "--export-textures") && (i + 3) < iron_get_arg_count()) {
|
||||
args_export_textures = true;
|
||||
++i;
|
||||
args_export_textures_type = string_copy(iron_get_arg(i));
|
||||
@@ -57,7 +57,7 @@ void args_parse() {
|
||||
else if (string_equals(current_arg, "--reload-mesh")) {
|
||||
args_reimport_mesh = true;
|
||||
}
|
||||
else if (string_equals(current_arg, "--export-mesh") && (i + 1) <= iron_get_arg_count()) {
|
||||
else if (string_equals(current_arg, "--export-mesh") && (i + 1) < iron_get_arg_count()) {
|
||||
args_export_mesh = true;
|
||||
++i;
|
||||
args_export_mesh_path = args_path(iron_get_arg(i));
|
||||
@@ -65,7 +65,7 @@ void args_parse() {
|
||||
else if (path_is_mesh(current_arg) || iron_is_directory(current_arg)) {
|
||||
args_asset_path = args_path(current_arg);
|
||||
}
|
||||
else if (string_equals(current_arg, "--export-material") && (i + 1) <= iron_get_arg_count()) {
|
||||
else if (string_equals(current_arg, "--export-material") && (i + 1) < iron_get_arg_count()) {
|
||||
args_export_material = true;
|
||||
++i;
|
||||
args_export_material_path = args_path(iron_get_arg(i));
|
||||
|
||||
Reference in New Issue
Block a user