From 9ffc253441db707aafd11069e5742aa73456ece5 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Tue, 5 Jul 2011 14:44:22 -0400 Subject: [PATCH] Make GetBannerPath consistent with Background. --- src/Song.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Song.cpp b/src/Song.cpp index 87eaf91058..637790165f 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -1551,7 +1551,15 @@ public: } static int GetSongDir( T* p, lua_State *L ) { lua_pushstring(L, p->GetSongDir() ); return 1; } static int GetMusicPath( T* p, lua_State *L ) { RString s = p->GetMusicPath(); if( s.empty() ) return 0; lua_pushstring(L, s); return 1; } - static int GetBannerPath( T* p, lua_State *L ) { RString s = p->GetBannerPath(); if( s.empty() ) return 0; LuaHelpers::Push(L, s); return 1; } + static int GetBannerPath( T* p, lua_State *L ) + { + RString s = p->GetBannerPath(); + if( !s.empty() ) + lua_pushstring(L, s); + else + lua_pushnil(L); + return 1; + } static int GetBackgroundPath( T* p, lua_State *L ) { RString s = p->GetBackgroundPath();