Change devices arrays from 1-origin to 0-origin.
[super-star-trek.git] / reports.c
index e6c9f6e5a98df0d0f72d1e649e036af4d0e46d14..de2ba1b1274928937e1b150a41457535d9e7b3b9 100644 (file)
--- a/reports.c
+++ b/reports.c
@@ -149,7 +149,7 @@ void dreprt(void)
     int jdam = FALSE, i;
     chew();
 
-    for (i = 1; i <= NDEVICES; i++) {
+    for (i = 0; i < NDEVICES; i++) {
        if (game.damage[i] > 0.0) {
            if (!jdam) {
                prout("DEVICE            -REPAIR TIMES-");
@@ -253,8 +253,9 @@ static void status(int req)
        case IHDOCKED: cp = "DOCKED"; break;
        case IHDEAD: cp="DEAD"; break;
        }
-       for (t=0;t<=NDEVICES;t++)
-           if (game.damage[t]>0) dam++;
+       for (t=0;t<NDEVICES;t++)
+           if (game.damage[t]>0) 
+               dam++;
        proutn("Condition     %s, %i DAMAGES", cp, dam);
        break;
     case 3: