X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;f=src%2Fserver%2Frun.c;h=708bd961ba89dd62847aa35f0f5711c5ef010319;hb=ff1ad8d5cfa86b38cc1436c6c9cc4135fb0a0f66;hp=808be55398a3a03e7f1d69d67c104d3850ebaffd;hpb=f934d0193c89585b9154210bf1ffb08aeebef12a;p=plomrogue diff --git a/src/server/run.c b/src/server/run.c index 808be55..708bd96 100644 --- a/src/server/run.c +++ b/src/server/run.c @@ -227,7 +227,7 @@ static int16_t * build_whitelist() for (; t; t = t->next, i_things++); int16_t * whitelist = try_malloc(i_things * sizeof(int16_t), __func__); for (i_things = 0, t = world.things; t; - whitelist[i_things] = t->id, t = t->next, i_things++) + whitelist[i_things] = t->id, t = t->next, i_things++); whitelist[i_things] = -1; return whitelist; } @@ -263,8 +263,8 @@ static void turn_over() world.turn++; thing = world.things; free(whitelist); - whitelist = build_whitelist(); - } + whitelist = build_whitelist();/* The whitelist excludes things */ + } /* that appear only during the turn.*/ if (thing_in_whitelist(thing->id, whitelist)) { if (0 < thing->lifepoints)