From a55c69dc6eec1610e25dcfb37160a1e982590400 Mon Sep 17 00:00:00 2001 From: John Bauer Date: Sun, 5 Nov 2006 00:09:54 +0000 Subject: [PATCH] Push the string for StepsType onto Lua instead of the integer. This fixes a bug where opening the course editor and pressing down immediately CTDs. There is still a bug where sometimes a "random" stepchart has an uninitialized StepsType. This can be reliably triggered by going to the Course Editor, creating a new course, and exiting without changing the course any. It will have one random song with an uninitialized StepsType, causing a CTD. --- stepmania/src/Trail.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/Trail.cpp b/stepmania/src/Trail.cpp index d6d6af18d1..e7bcd661d9 100644 --- a/stepmania/src/Trail.cpp +++ b/stepmania/src/Trail.cpp @@ -192,7 +192,7 @@ class LunaTrail: public Luna { public: static int GetDifficulty( T* p, lua_State *L ) { LuaHelpers::Push(L, p->m_CourseDifficulty ); return 1; } - static int GetStepsType( T* p, lua_State *L ) { lua_pushnumber(L, p->m_StepsType ); return 1; } + static int GetStepsType( T* p, lua_State *L ) { LuaHelpers::Push(L, p->m_StepsType ); return 1; } static int GetRadarValues( T* p, lua_State *L ) { RadarValues &rv = const_cast(p->GetRadarValues());