diff options
author | Thomas White <taw@physics.org> | 2011-03-08 15:25:21 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:18 +0100 |
commit | 8cb16f40549e2235ed1518a303313d67c90b2db7 (patch) | |
tree | 1c6158afe50b3bb40bf352076775f85c17e34443 /src/detector.c | |
parent | b264348bc81338112666f2e1d086729113357fa8 (diff) |
Don't forget to copy the bad regions in copy_geom()
Diffstat (limited to 'src/detector.c')
-rw-r--r-- | src/detector.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/detector.c b/src/detector.c index 752e493c..b9239a0d 100644 --- a/src/detector.c +++ b/src/detector.c @@ -702,6 +702,9 @@ struct detector *copy_geom(const struct detector *in) out->panels = malloc(out->n_panels * sizeof(struct panel)); memcpy(out->panels, in->panels, out->n_panels * sizeof(struct panel)); + out->bad = malloc(out->n_bad * sizeof(struct badregion)); + memcpy(out->bad, in->bad, out->n_bad * sizeof(struct badregion)); + for ( i=0; i<out->n_panels; i++ ) { struct panel *p; |