Fix production tabs crash

This commit is contained in:
Paul Chote
2011-07-06 23:41:15 +12:00
parent 07ae0688ff
commit 29a90021f6

View File

@@ -221,7 +221,7 @@ namespace OpenRA.Mods.Cnc.Widgets
// Check production tabs
var offsetloc = mi.Location - new int2(leftButtonRect.Right - 1 + (int)ListOffset, leftButtonRect.Y);
if (offsetloc.X > 0 && offsetloc.X <= ContentWidth)
if (offsetloc.X > 0 && offsetloc.X < ContentWidth)
{
var palette = Widget.RootWidget.GetWidget<ProductionPaletteWidget>(PaletteWidget);
palette.CurrentQueue = Groups[queueGroup].Tabs[offsetloc.X/(TabWidth - 1)].Queue;