From: Laszlo T. <ave...@us...> - 2011-01-13 18:04:35
|
gemrb: Infinity Engine emulator The branch master has been updated via 464889cbdf0d25f2a3ce84f05e5172b38c6cd429 (commit) Summary of changes: gemrb/core/Game.cpp | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) from d7a5f64c0b9a1814ed727dc106d57dd1617262c9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=464889cbdf0d25f2a3ce84f05e5172b38c6cd429 commit 464889cbdf0d25f2a3ce84f05e5172b38c6cd429 Author: Avenger <ave...@so...> Date: Thu Jan 13 19:03:50 2011 +0100 fixed another possible autotable crash diff --git a/gemrb/core/Game.cpp b/gemrb/core/Game.cpp index 59cc9f5..85f5bfd 100644 --- a/gemrb/core/Game.cpp +++ b/gemrb/core/Game.cpp @@ -367,6 +367,11 @@ void Game::InitActorPos(Actor *actor) unsigned int ip = (unsigned int) (actor->InParty-1); AutoTable start("start"); AutoTable strta("startpos"); + + if (!start || !strta) { + printMessage("Game","Game is missing character start data.\n",RED); + abort(); + } // 0 - single player, 1 - tutorial, 2 - expansion ieDword playmode = 0; core->GetDictionary()->Lookup( "PlayMode", playmode ); @@ -386,8 +391,11 @@ void Game::InitActorPos(Actor *actor) actor->Pos.y = actor->Destination.y = (short) atoi( strta->QueryField( strta->GetRowIndex(ypos), ip ) ); actor->SetOrientation( atoi( strta->QueryField( strta->GetRowIndex(rot), ip) ), false ); - strta.load("startare"); - strnlwrcpy(actor->Area, strta->QueryField( strta->GetRowIndex(area), 0 ), 8 ); + if (strta.load("startare")) { + strnlwrcpy(actor->Area, strta->QueryField( strta->GetRowIndex(area), 0 ), 8 ); + } else { + strnlwrcpy(actor->Area, CurrentArea, 8 ); + } } int Game::JoinParty(Actor* actor, int join) ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |