From 737b0fedb4586c351719dcf44c8050d0822e0f01 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 21 Sep 2003 09:45:25 +0000 Subject: [PATCH] denkfehler --- src/eressea/korrektur.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index c669d9584..7aa3f640e 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -1278,7 +1278,10 @@ static void s_change(stats_t** s, const struct item_type * type, int count) { while (*s && (*s)->type!=type) s=&(*s)->next; - if (*s==NULL) *s = calloc(1, sizeof(stats_t)); + if (*s==NULL) { + *s = calloc(1, sizeof(stats_t)); + (*s)->type = type; + } (*s)->number += count; }