commit 103e9e700a02cb3993467b07ee786b118905b7c5
parent 08c0275e93e70fc4af24e8a2b529bd73ca878d70
Author: Eduardo Fontana Lazzari <edufonlaz@gmail.com>
Date: Wed, 9 Jul 2025 10:39:50 +0200
Fix: update surface count when adding new interface surface
Previously, when a new surface was added to an interface side, the
corresponding counter was not incremented. This caused the surface_count
to remain at its initial value, potentially leading to errors during
subsequent Monte Carlo calculations.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/sphor_config.c b/src/sphor_config.c
@@ -99,6 +99,7 @@ register_interface
return res;
}
+
/*******************************************************************************
* Volume setup
******************************************************************************/
@@ -154,7 +155,7 @@ setup_interface_volume_geometry_triangle
if(INVALID_ID != interface->volumes[side]) {
ERROR(sphor,
- "Redefinition of volume side in triangle from file '%s'.\n",
+ "Redefinition of volume side in triangle from file '%s'.\n",
geom_desc->filename);
res = RES_BAD_ARG;
goto error;
@@ -308,6 +309,7 @@ setup_interface_surface_geometry_triangle
goto error;
}
interface->surfaces[side][surf_count] = isurface;
+ interface->surface_count[side] += 1;
exit:
return res;