diff --git a/main/fuelcen.c b/main/fuelcen.c index 6a68416bd..c5e29f685 100644 --- a/main/fuelcen.c +++ b/main/fuelcen.c @@ -799,7 +799,7 @@ void fuelcen_check_for_hoard_goal(segment *segp) */ void old_matcen_info_read(old_matcen_info *mi, PHYSFS_file *fp) { - mi->robot_flags = PHYSFSX_readInt(fp); + mi->robot_flags[0] = PHYSFSX_readInt(fp); mi->hit_points = PHYSFSX_readFix(fp); mi->interval = PHYSFSX_readFix(fp); mi->segnum = PHYSFSX_readShort(fp); diff --git a/main/fuelcen.h b/main/fuelcen.h index a49dce3e9..6cc6314e6 100644 --- a/main/fuelcen.h +++ b/main/fuelcen.h @@ -115,7 +115,7 @@ typedef struct FuelCenter { extern int Num_robot_centers; typedef struct { - int robot_flags; // Up to 32 different robots + int robot_flags[1]; // Up to 32 different robots fix hit_points; // How hard it is to destroy this particular matcen fix interval; // Interval between materialogrifizations short segnum; // Segment this is attached to. diff --git a/main/gamesave.c b/main/gamesave.c index f6d967dba..07aef7af7 100644 --- a/main/gamesave.c +++ b/main/gamesave.c @@ -977,7 +977,7 @@ int load_game_data(PHYSFS_file *LoadFile) if (game_top_fileinfo_version < 27) { old_matcen_info m; old_matcen_info_read(&m, LoadFile); - RobotCenters[i].robot_flags[0] = m.robot_flags; + RobotCenters[i].robot_flags[0] = m.robot_flags[0]; RobotCenters[i].robot_flags[1] = 0; RobotCenters[i].hit_points = m.hit_points; RobotCenters[i].interval = m.interval;