aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2024-01-12 13:59:41 +0100
committerThomas White <taw@physics.org>2024-01-12 15:22:50 +0100
commitc6448075aef8607ac370bb69782b5b18f82ef120 (patch)
tree2c9ca1aed90fda8faeac5d13403f4222dd86a0b0 /src
parent9918b000068b7daceb0c62921a47922f88b17161 (diff)
indexamajig: Implement --max-mille-level
Diffstat (limited to 'src')
-rw-r--r--src/indexamajig.c4
-rw-r--r--src/process_image.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c
index fd95a01c..ce8b2cbf 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -754,6 +754,10 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
ERROR("Invalid value for --max-mille-level\n");
return EINVAL;
}
+ if ( args->iargs.max_mille_level < 0 ) {
+ ERROR("Invalid value for --max-mille-level\n");
+ return EINVAL;
+ }
break;
/* ---------- Integration ---------- */
diff --git a/src/process_image.c b/src/process_image.c
index 57a994ac..2f856594 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -420,7 +420,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
set_last_task(last_task, "indexing");
profile_start("index");
index_pattern_4(image, iargs->ipriv, &sb_shared->pings[cookie],
- last_task, mille);
+ last_task, mille, iargs->max_mille_level);
profile_end("index");
r = chdir(rn);