aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kscripts.cpp10
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;
}