From dc13af28ac2791753a4f1843afd7e77197e0bd55 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 16 Jun 2005 01:39:31 +0000 Subject: [PATCH] add MonthToString binding --- stepmania/src/DateTime.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/DateTime.cpp b/stepmania/src/DateTime.cpp index 5a930ddf66..81e23ab2c6 100644 --- a/stepmania/src/DateTime.cpp +++ b/stepmania/src/DateTime.cpp @@ -169,8 +169,11 @@ static const CString MONTH_TO_NAME[MONTHS_IN_YEAR] = CString MonthToString( int iMonthIndex ) { + if( iMonthIndex < 0 || iMonthIndex >= (int) sizeof(MONTH_TO_NAME) ) + return ""; return MONTH_TO_NAME[iMonthIndex]; } +LuaFunction( MonthToString, MonthToString( IArg(1) ) ); CString LastWeekToString( int iLastWeekIndex ) {