commit 5366b16fb09731a902a2a9f1c3b0b340f5513025 parent bdc86e5d6be19374c61e4fe96dc73c70954797ff Author: Christophe Coustet <christophe.coustet@meso-star.com> Date: Thu, 19 Dec 2019 14:20:00 +0100 Fix helper function Diffstat:
| M | src/sg3_senc_helper.h | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/sg3_senc_helper.h b/src/sg3_senc_helper.h @@ -50,8 +50,10 @@ sg3_senc_geometry_get_media__ ASSERT(media && geometry); r = sg3_geometry_get_unique_triangle_properties(geometry, itri, tmp); ASSERT(r == RES_OK); (void)r; - media[SENC_FRONT] = tmp[SG3_FRONT]; - media[SENC_BACK] = tmp[SG3_BACK]; + media[SENC_FRONT] = (tmp[SG3_FRONT] == SG3_UNDEFINED_PROPERTY) + ? SENC_UNDEFINED_MEDIUM : tmp[SG3_FRONT]; + media[SENC_BACK] = (tmp[SG3_BACK] == SG3_UNDEFINED_PROPERTY) + ? SENC_UNDEFINED_MEDIUM : tmp[SG3_BACK]; } /* Get vertex indices for the itri_th triangle.