star-gas

Load and structure gas data
git clone git://git.meso-star.fr/star-gas.git
Log | Files | Refs | README | LICENSE

commit ae1ae41f6f41a6ad0a3a47ef6d9475564b674c0a
parent 182c3ba5fbe0842b6e34669cbee3a7988d26f04d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue,  3 Mar 2026 16:37:56 +0100

Return an error if the property list is empty

A gas cannot have no thermodynamic properties.

Diffstat:
Msrc/sgas.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/sgas.c b/src/sgas.c @@ -557,6 +557,13 @@ setup_therm_props if(res != RES_OK) goto error; } + if(darray_therm_props_size_get(&gas->therm_props) == 0) { + ERROR(gas, "%s: the list of thermodynamic properties is empty\n", + txtrdr_get_name(txtrdr)); + res = RES_BAD_ARG; + goto error; + } + #undef PROPS_NAME exit: