Switch to 0-indexing for hint handling code.
[open-adventure.git] / init.c
diff --git a/init.c b/init.c
index d7789ad7ce85aa17a9f23bb4b0d9165107a26e7e..76bdc8ae21732c08e4449120769f81a8149e4aa6 100644 (file)
--- a/init.c
+++ b/init.c
@@ -5,7 +5,6 @@
 
 #include "advent.h"
 #include "database.h"
-#include "newdb.h"
 
 /*
  * Initialisation
@@ -226,7 +225,7 @@ void initialise(void)
     /*  Clear the hint stuff.  game.hintlc[i] is how long he's been at LOC
      *  with cond bit i.  game.hinted[i] is true iff hint i has been
      *  used. */
-    for (int i = 1; i <= HNTMAX; i++) {
+    for (int i = 0; i < HINT_COUNT; i++) {
         game.hinted[i] = false;
         game.hintlc[i] = 0;
     }