aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-07-30 15:39:23 +0200
committerThomas White <taw@physics.org>2020-07-30 15:39:23 +0200
commitaa997b67c7b4bc762df278ce952f3c1f766c2a5b (patch)
tree553d30ac4c634b6775eb05f2eee1f52d19239854 /libcrystfel
parentb35f143788cd8154d5231475ce52d88d2544f384 (diff)
Fix placeholder counting
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/datatemplate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcrystfel/src/datatemplate.c b/libcrystfel/src/datatemplate.c
index 2459f946..94522f2f 100644
--- a/libcrystfel/src/datatemplate.c
+++ b/libcrystfel/src/datatemplate.c
@@ -829,7 +829,7 @@ static int parse_toplevel(DataTemplate *dt,
static int dt_num_path_placeholders(const char *str)
{
size_t i, len;
- int n_pl;
+ int n_pl = 0;
if ( str == NULL ) return 0;
@@ -1037,9 +1037,9 @@ DataTemplate *data_template_new_from_string(const char *string_in)
return NULL;
}
- num_data_pl = dt_num_path_placeholders(dt->panels[i].data);
- num_mask_pl = dt_num_path_placeholders(dt->panels[i].mask);
- num_satmap_pl = dt_num_path_placeholders(dt->panels[i].satmap);
+ num_data_pl = dt_num_path_placeholders(dt->panels[0].data);
+ num_mask_pl = dt_num_path_placeholders(dt->panels[0].mask);
+ num_satmap_pl = dt_num_path_placeholders(dt->panels[0].satmap);
/* This is because the "data" path will be used to expand
* the path to generate the event list */