diff options
author | Filippos Karapetis | 2010-07-01 21:08:38 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-07-01 21:08:38 +0000 |
commit | d5e037e703dfa5ab64bb390e31f817deb85cfb02 (patch) | |
tree | fcb3417fb20f1a3a138e034a50222c59b72df47e /engines/sci/engine/kernel32.cpp | |
parent | 0e3f923f78055d0ffe76d5020392653728496f02 (diff) | |
download | scummvm-rg350-d5e037e703dfa5ab64bb390e31f817deb85cfb02.tar.gz scummvm-rg350-d5e037e703dfa5ab64bb390e31f817deb85cfb02.tar.bz2 scummvm-rg350-d5e037e703dfa5ab64bb390e31f817deb85cfb02.zip |
Added some slight fixes for the RAMA demo, which starts now, though it dies horribly when clicking on anything
svn-id: r50569
Diffstat (limited to 'engines/sci/engine/kernel32.cpp')
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index 564e0b76c3..2d492eb3ee 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -463,6 +463,13 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) { return argv[1]; } case 6: { // Cpy + if (s->_segMan->getSegmentObj(argv[1].segment)->getType() != SEG_TYPE_ARRAY || + s->_segMan->getSegmentObj(argv[3].segment)->getType() != SEG_TYPE_ARRAY) { + // Happens in the RAMA demo + warning("kArray(Cpy): Request to copy a segment which isn't an array, ignoring"); + return NULL_REG; + } + SciArray<reg_t> *array1 = s->_segMan->lookupArray(argv[1]); SciArray<reg_t> *array2 = s->_segMan->lookupArray(argv[3]); uint32 index1 = argv[2].toUint16(); |