fix crash on long rows
This commit is contained in:
@@ -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 )
|
||||||
|
|||||||
Reference in New Issue
Block a user