fix crash on long rows

This commit is contained in:
Chris Danford
2004-01-10 21:07:12 +00:00
parent b6fc0d194e
commit 234b574970
+7 -10
View File
@@ -518,17 +518,14 @@ BitmapText &ScreenOptions::GetTextItemForRow( PlayerNumber pn, int iRow, int iCh
if( row.Type == Row::ROW_EXIT ) if( row.Type == Row::ROW_EXIT )
return *row.m_textItems[0]; return *row.m_textItems[0];
if( !row.m_bRowIsLong ) bool bOneChoice = m_Rows[iRow]->m_RowDef.bOneChoiceForAllPlayers;
return *row.m_textItems[iChoiceOnRow]; int index = -1;
if( row.m_bRowIsLong )
const bool bOneChoice = m_Rows[iRow]->m_RowDef.bOneChoiceForAllPlayers; index = bOneChoice ? 0 : pn;
CHECKPOINT;
if( bOneChoice )
return *row.m_textItems[0];
else else
return *row.m_textItems[iChoiceOnRow]; index = iChoiceOnRow;
return *row.m_textItems[index];
} }
void ScreenOptions::GetWidthXY( PlayerNumber pn, int iRow, int iChoiceOnRow, int &iWidthOut, int &iXOut, int &iYOut ) void ScreenOptions::GetWidthXY( PlayerNumber pn, int iRow, int iChoiceOnRow, int &iWidthOut, int &iXOut, int &iYOut )