X-Git-Url: https://plomlompom.com/repos/index.html?a=blobdiff_plain;f=src%2Fserver%2Fthings.c;h=e73a09a283c09fb843292996c0b6ee3561f68d2f;hb=9281cb7dd7656ff5d19e0747f819051a884649ec;hp=4097f61a65707fc01dfe07a11a7cfa77b65c8dbd;hpb=51aa064d49b98de950dbcd7b154fa73d5d2eb359;p=plomrogue
diff --git a/src/server/things.c b/src/server/things.c
index 4097f61..e73a09a 100644
--- a/src/server/things.c
+++ b/src/server/things.c
@@ -31,8 +31,8 @@ struct NextAndId
/* To linked list of NextAndId structs (or rather structs whose start region is
* compatible to it) starting at "start", add newly allocated element of
* "n_size" and an ID that is either "id" or, if "id" is <= UINT8_MAX and >=
- * "id_start", get lowest ID for new thing ("struct_id"==0), thing type
- * ("struct_id"==1) or thing action ("struct_id"==2).
+ * "id_start", get lowest ID >= "start_id" and <= UINT8_MAX for new thing
+ * ("struct_id"=0), thing type ("struct_id"=1) or thing action ("struct_id"=2).
*/
static struct NextAndId * add_to_struct_list(size_t n_size, uint8_t start_id,
int16_t id, uint8_t struct_id,
@@ -99,6 +99,7 @@ extern struct ThingType * add_thing_type(int16_t id)
&world.thing_types);
set_cleanup_flag(CLEANUP_THING_TYPES);
tt->name = strdup("(none)");
+ tt->corpse_id = tt->id;
return tt;
}
@@ -155,6 +156,7 @@ extern void free_things(struct Thing * t)
free_things(t->owns);
free_things(t->next);
free(t->fov_map);
+ free(t->mem_map);
free(t);
if (t == world.things) /* So add_things()' NULL-delimited thing */
{ /* iteration loop does not iterate over */