From fc0e64586c376f96ba33f13af6c7f7d88ea4cd78 Mon Sep 17 00:00:00 2001 From: belugas <belugas@openttd.org> Date: Thu, 4 Nov 2010 19:48:25 +0000 Subject: [PATCH] (svn r21083) -Codechange: Limit the number of exceptions in the refittable cargo list to 7 (Eddi) --- src/vehicle_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 56d1c4903a..4906d67a79 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -686,7 +686,7 @@ uint ShowRefitOptionsList(int left, int right, int y, EngineID engine) } else { /* Check if we are able to refit to more cargo types and unable to. If * so, invert the cargo types to list those that we can't refit to. */ - if (CountBits(cmask ^ lmask) < CountBits(cmask)) { + if (CountBits(cmask ^ lmask) < CountBits(cmask) && CountBits(cmask ^ lmask) <= 7) { cmask ^= lmask; b = InlineString(b, STR_PURCHASE_INFO_ALL_BUT); }