diff options
Diffstat (limited to 'core/equipment.c')
-rw-r--r-- | core/equipment.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/equipment.c b/core/equipment.c index bd1a0b4e3..e7ac327fd 100644 --- a/core/equipment.c +++ b/core/equipment.c @@ -19,9 +19,13 @@ #include "subsurface-string.h" #include "table.h" -static void free_weightsystem(weightsystem_t w) +/* Warning: this has strange semantics for C-code! Not the weightsystem object + * is freed, but the data it references. The object itself is passed in by value. + * This is due to the fact how the table macros work. + */ +void free_weightsystem(weightsystem_t ws) { - free((void *)w.description); + free((void *)ws.description); } static void free_cylinder(cylinder_t c) |