From 56d052f6f128a98faaa01d2e6fb0618770f4656d Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 20 Oct 2006 07:50:20 +0000 Subject: [PATCH] Fix potential crash if the style has more columns than the max allowed. --- stepmania/src/ScreenNameEntry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 2f5771ad7a..0fe8035c20 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -211,12 +211,12 @@ void ScreenNameEntry::Init() const Style* pStyle = GAMESTATE->GetCurrentStyle(); - + const int iMaxCols = min( ABS_MAX_RANKING_NAME_LENGTH, pStyle->m_iColsPerPlayer ); m_ColToStringIndex[p].insert(m_ColToStringIndex[p].begin(), pStyle->m_iColsPerPlayer, -1); int CurrentStringIndex = 0; vector xs; - for( int iCol=0; iColm_iColsPerPlayer; iCol++ ) + for( int iCol=0; iCol