diff options
author | Colin Snover | 2017-06-07 13:31:16 -0500 |
---|---|---|
committer | Colin Snover | 2017-06-09 22:48:15 -0500 |
commit | f0d00caf93b4d329fa39d66740906c317317780c (patch) | |
tree | 0a76269b9784c91e62beea71f22082fc763e0538 /engines | |
parent | f48fc02a9ba42ceba608e8a5eef785f3b3abeed6 (diff) | |
download | scummvm-rg350-f0d00caf93b4d329fa39d66740906c317317780c.tar.gz scummvm-rg350-f0d00caf93b4d329fa39d66740906c317317780c.tar.bz2 scummvm-rg350-f0d00caf93b4d329fa39d66740906c317317780c.zip |
SCI: Remove unnecessary condition
Argument count validation for kernel calls is performed through the
kernel table signature, so checking here is not necessary.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 015daf2e5b..c04de525f0 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -49,13 +49,11 @@ reg_t kLoad(EngineState *s, int argc, reg_t *argv) { // behavior of this call didn't change between sci0->sci1.1 parameter wise, which means getting called with // 1 or 3+ parameters is not right according to sierra sci reg_t kUnLoad(EngineState *s, int argc, reg_t *argv) { - if (argc >= 2) { - ResourceType restype = g_sci->getResMan()->convertResType(argv[0].toUint16()); - reg_t resnr = argv[1]; + ResourceType restype = g_sci->getResMan()->convertResType(argv[0].toUint16()); + reg_t resnr = argv[1]; - if (restype == kResourceTypeMemory) - s->_segMan->freeHunkEntry(resnr); - } + if (restype == kResourceTypeMemory) + s->_segMan->freeHunkEntry(resnr); return s->r_acc; } |