home · contact · privacy
Server: Fix critical bug that stems from omission of a single semicolon.
[plomrogue] / src / server / run.c
index 808be55398a3a03e7f1d69d67c104d3850ebaffd..708bd961ba89dd62847aa35f0f5711c5ef010319 100644 (file)
@@ -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)