(svn r11371) -Fix [FS#1396]: the industry protection only kicked in when it should not kick in.
authorrubidium
Sat, 03 Nov 2007 15:21:26 +0000
changeset 7821 dbdfb0db23ba
parent 7820 d4b13c0cae8d
child 7822 dc5f1aa98fe9
(svn r11371) -Fix [FS#1396]: the industry protection only kicked in when it should not kick in.
src/industry_cmd.cpp
--- a/src/industry_cmd.cpp	Sat Nov 03 06:20:25 2007 +0000
+++ b/src/industry_cmd.cpp	Sat Nov 03 15:21:26 2007 +0000
@@ -1841,7 +1841,7 @@
 
 	/* oil wells (or the industries with that flag set) are always allowed to closedown */
 	if (indspec->behaviour & INDUSTRYBEH_DONT_INCR_PROD && _opt.landscape == LT_TEMPERATE) return false;
-	return (indspec->behaviour & INDUSTRYBEH_CANCLOSE_LASTINSTANCE && GetIndustryTypeCount(type) <= 1);
+	return (indspec->behaviour & INDUSTRYBEH_CANCLOSE_LASTINSTANCE) == 0 && GetIndustryTypeCount(type) <= 1;
 }
 
 /** Change industry production or do closure