diff options
author | Paul Gilbert | 2012-05-13 15:50:15 +1000 |
---|---|---|
committer | Paul Gilbert | 2012-05-13 15:50:15 +1000 |
commit | 089d7048b60b8ac880b47a0835b5c2890d8d4423 (patch) | |
tree | 5687126c326083e6ce4aa873828b88b752c3d34f /engines | |
parent | 81e5a19d58274c2845587500db25c94502eb99a3 (diff) | |
download | scummvm-rg350-089d7048b60b8ac880b47a0835b5c2890d8d4423.tar.gz scummvm-rg350-089d7048b60b8ac880b47a0835b5c2890d8d4423.tar.bz2 scummvm-rg350-089d7048b60b8ac880b47a0835b5c2890d8d4423.zip |
TONY: Bugfix for crash when removing item from inventory
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tony/gfxengine.cpp | 2 | ||||
-rw-r--r-- | engines/tony/inventory.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp index 2c8543326f..8f7d27dafc 100644 --- a/engines/tony/gfxengine.cpp +++ b/engines/tony/gfxengine.cpp @@ -341,7 +341,7 @@ SKIPCLICKSINISTRO: // ********************** // Disegna la lista di OT // ********************** - m_bigBuf.DrawOT(Common::nullContext); + CORO_INVOKE_0(m_bigBuf.DrawOT); #define FSTEP (480/32) diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp index b4eef0ac0d..468ec225a5 100644 --- a/engines/tony/inventory.cpp +++ b/engines/tony/inventory.cpp @@ -266,11 +266,11 @@ void RMInventory::RemoveThis(CORO_PARAM, bool &result) { void RMInventory::RemoveItem(int code) { int i; - for (i=0;i<m_nInv;i++) + for (i = 0; i < m_nInv; i++) if (m_inv[i] == code - 10000) { g_system->lockMutex(m_csModifyInterface); - Common::copy_backward(&m_inv[i + 1], &m_inv[i + 1] + (m_nInv - i), &m_inv[i]); + Common::copy(&m_inv[i + 1], &m_inv[i + 1] + (m_nInv - i), &m_inv[i]); // m_inv[m_nInv-1]=0; m_nInv--; |