diff options
author | James Brown | 2002-11-02 12:20:41 +0000 |
---|---|---|
committer | James Brown | 2002-11-02 12:20:41 +0000 |
commit | e7a245114ddcec2994f00da205797138051aedce (patch) | |
tree | f3fc95bf2fddf32d52bac784412694dde1642bd8 /scumm/script.cpp | |
parent | 54c408a81055c2a66168a16653fe7a33ef173ada (diff) | |
download | scummvm-rg350-e7a245114ddcec2994f00da205797138051aedce.tar.gz scummvm-rg350-e7a245114ddcec2994f00da205797138051aedce.tar.bz2 scummvm-rg350-e7a245114ddcec2994f00da205797138051aedce.zip |
Make stack problems a little more verbose
svn-id: r5380
Diffstat (limited to 'scumm/script.cpp')
-rw-r--r-- | scumm/script.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index 7d95e4ae4b..7f732faa8c 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -843,7 +843,10 @@ void Scumm::push(int a) int Scumm::pop() { - assert(_scummStackPos > 0 && (unsigned int)_scummStackPos <= ARRAYSIZE(_scummStack)); + if ((_scummStackPos > 0) && ((unsigned int)_scummStackPos <= ARRAYSIZE(_scummStack))) { + error("No items on stack to pop() for %s (0x%X) at [%d-%d]\n", _opcodes_lookup[_opcode], _opcode, _roomResource, vm.slot[_currentScript].number); + } + return _scummStack[--_scummStackPos]; } |