diff options
| -rw-r--r-- | engines/hdb/ai-cinematic.cpp | 3 | ||||
| -rw-r--r-- | engines/hdb/lua-script.cpp | 10 | 
2 files changed, 11 insertions, 2 deletions
| diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp index 9d55df22d6..a09eeb47db 100644 --- a/engines/hdb/ai-cinematic.cpp +++ b/engines/hdb/ai-cinematic.cpp @@ -415,7 +415,8 @@ void AI::cineStart(bool abortable, const char *abortFunc) {  void AI::cineStop(const char *funcNext) {  	CineCommand *cmd = new CineCommand;  	cmd->cmdType = C_STOPCINE; -	strcpy(cmd->title, funcNext); +	if (funcNext) +		strcpy(cmd->title, funcNext);  	_cine.push_back(cmd);  } diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 9a67f4bf69..b2eeb4d83b 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -82,7 +82,15 @@ static int cineStart(lua_State *L) {  }  static int cineStop(lua_State *L) { -	warning("STUB: STOP CINE"); +	const char *funcNext = NULL; + +	int stackTop = lua_gettop(L); +	if (stackTop) { +		funcNext = lua_tostring(L, 1); +		lua_pop(L, 1); +	} + +	g_hdb->_ai->cineStop(funcNext);  	return 0;  } | 
