From bbd182b113736b5c8e6e934d3b5748f73e8cba92 Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 23 Mar 2013 21:20:41 +0000 Subject: [PATCH] Fix bogus optimization in robot maker paging The optimization meant to skip materialization centers which had no robots enabled, but had two bugs. It tested for a NULL address instead of inspecting the bits in robot_flags[0], which caused the test to always succeed. It also ignored robot_flags[1], so a materialization center with only high end robots would be wrongly skipped. Remove the test, since the loop is cheap and handles all cases correctly. --- main/paging.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/main/paging.c b/main/paging.c index f10e35119..8f2332908 100644 --- a/main/paging.c +++ b/main/paging.c @@ -272,7 +272,6 @@ void paging_touch_robot_maker( segment * segp ) if ( seg2p->special == SEGMENT_IS_ROBOTMAKER ) { paging_touch_vclip(&Vclip[VCLIP_MORPHING_ROBOT]); - if (RobotCenters[seg2p->matcen_num].robot_flags != 0) { int i; uint flags; int robot_index; @@ -289,7 +288,6 @@ void paging_touch_robot_maker( segment * segp ) robot_index++; } } - } } }