Switch to 0-indexing for hint handling code.
[open-adventure.git] / score.c
diff --git a/score.c b/score.c
index b2db8a6a54097913ad2068c701533b34b8f66008..cd4b9e6d2ff779ce65ca37decc1667165adc9723 100644 (file)
--- a/score.c
+++ b/score.c
@@ -87,9 +87,9 @@ long score(enum termination mode)
     mxscor += 2;
 
     /* Deduct for hints/turns/saves. Hints < 4 are special; see database desc. */
-    for (long i = 1; i <= HINT_COUNT; i++) {
+    for (long i = 0; i < HINT_COUNT; i++) {
         if (game.hinted[i])
-            score = score - hints[i-1].penalty;
+            score = score - hints[i].penalty;
     }
     if (game.novice)
         score -= 5;