Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-28 05:07:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-28 06:04:44 +0300
commit6445caa9b55cea365da7ace5de006e950746064b (patch)
tree386297cc519ac24ea58efd10b59a396f7cb1325c /source/creator
parentc518cd73cdba971f27943f491cdb3525ddcf3176 (diff)
BLI_args: disallow zero to be used as a pass value
Introduced recently in 09139e41ed4ea. While this worked in the cases it was used, '--threads' for example was failing to parse the number when it's pass was set to 0. Increase the enum values to start at 1 & add asserts so this wont happen again.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator_intern.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/creator/creator_intern.h b/source/creator/creator_intern.h
index fe8f8c4e20e..5f184e4cef3 100644
--- a/source/creator/creator_intern.h
+++ b/source/creator/creator_intern.h
@@ -57,14 +57,14 @@ extern struct ApplicationState app_state; /* creator.c */
* Keep in order of execution.
*/
enum {
- ARG_PASS_ENVIRONMENT = 0,
- ARG_PASS_SETTINGS = 1,
+ ARG_PASS_ENVIRONMENT = 1,
+ ARG_PASS_SETTINGS = 2,
/** Windowing & graphical settings, ignored in background mode. */
- ARG_PASS_SETTINGS_GUI = 2,
- ARG_PASS_SETTINGS_FORCE = 3,
+ ARG_PASS_SETTINGS_GUI = 3,
+ ARG_PASS_SETTINGS_FORCE = 4,
/** Actions & fall back to loading blend file. */
- ARG_PASS_FINAL = 4,
+ ARG_PASS_FINAL = 5,
};
/* for the callbacks: */