commit 700e1fd4306ce1b3c1c6af891a94bbf7f8cd2369
parent 578f5e7194e043d530a54a46d576d6b897cfa615
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Tue, 26 Mar 2019 17:37:42 +0100
BugFix: wrong data copy on array increase
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/sdis_scene_c.h b/src/sdis_scene_c.h
@@ -93,6 +93,7 @@ enclosure_init(struct mem_allocator* allocator, struct enclosure* enc)
enc->S_over_V = 0;
enc->V = 0;
enc->hc_upper_bound = 0;
+ enc->medium_id = UINT_MAX;
}
static INLINE void
@@ -117,6 +118,7 @@ enclosure_copy(struct enclosure* dst, const struct enclosure* src)
dst->S_over_V = src->S_over_V;
dst->V = src->V;
dst->hc_upper_bound = src->hc_upper_bound;
+ dst->medium_id = src->medium_id;
return darray_uint_copy(&dst->local2global, &src->local2global);
}
@@ -139,6 +141,7 @@ enclosure_copy_and_release(struct enclosure* dst, struct enclosure* src)
dst->S_over_V = src->S_over_V;
dst->V = src->V;
dst->hc_upper_bound = src->hc_upper_bound;
+ dst->medium_id = src->medium_id;
return RES_OK;
}