aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-04-13 22:06:30 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:24 +0100
commit2b01c35b2e7408b10b7958842ac07f0bb9cc1153 (patch)
treea527808b3963f0a0f12aa61ce4b5140c60a31f24 /src
parentf1bacb9686a4b1d3a21f1c12d40ae08ac63041a6 (diff)
Take a copy of "mask" when duplicating a detector
Diffstat (limited to 'src')
-rw-r--r--src/detector.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/detector.c b/src/detector.c
index ec99facf..4d60f66e 100644
--- a/src/detector.c
+++ b/src/detector.c
@@ -782,6 +782,8 @@ struct detector *copy_geom(const struct detector *in)
out = malloc(sizeof(struct detector));
memcpy(out, in, sizeof(struct detector));
+ out->mask = strdup(in->mask);
+
out->panels = malloc(out->n_panels * sizeof(struct panel));
memcpy(out->panels, in->panels, out->n_panels * sizeof(struct panel));