Commit f1a71a73 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Crash in the i/o code with debugging checks if a field description is left empty.

parent ba67300e
......@@ -348,11 +348,13 @@ void writeArray(const struct engine* e, hid_t grp, char* fileName,
"Conversion factor to phyical CGS (including cosmological corrections)",
factor * pow(e->cosmology->a, props.scale_factor_exponent));
if (strlen(props.description) != 0) {
#ifdef SWIFT_DEBUG_CHECKS
if (strlen(props.description) == 0)
error("Invalid (empty) description of the field '%s'", props.name);
#endif
/* Write the full description */
io_write_attribute_s(h_data, "Description", props.description);
}
/* Write the full description */
io_write_attribute_s(h_data, "Description", props.description);
/* Free and close everything */
swift_free("writebuff", temp);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment