From 8e7b2f7d15b835b23aab7819070e2d1d2c19f96b Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 2 Feb 2014 02:59:08 +0000 Subject: [PATCH] Fix range in disable_matcens Num_robot_centers is for RobotCenters[], not Station[]. --- similar/main/fuelcen.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/similar/main/fuelcen.cpp b/similar/main/fuelcen.cpp index df1caaf8a..791e1dacf 100644 --- a/similar/main/fuelcen.cpp +++ b/similar/main/fuelcen.cpp @@ -56,6 +56,9 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "escort.h" #include "byteswap.h" +#include "compiler-range_for.h" +#include "partial_range.h" + // The max number of fuel stations per mine. static const fix Fuelcen_refill_speed = i2f(1); @@ -678,12 +681,12 @@ fix repaircen_give_shields(segment *segp, fix MaxAmountCanTake ) // -------------------------------------------------------------------------------------------- void disable_matcens(void) { - int i; - - for (i=0; i