aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kgraphics.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index f56c5bb5e1..424d5049e5 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -553,9 +553,11 @@ reg_t kPalette(EngineState *s, int argc, reg_t *argv) {
switch (argv[0].toUint16()) {
case 1: // Set resource palette
- if (argc==3) {
+ if (argc == 2 || argc == 3) {
GuiResourceId resourceId = argv[1].toUint16();
- bool force = argv[2].toUint16() == 2 ? true : false;
+ bool force = false;
+ if (argc == 3)
+ force = argv[2].toUint16() == 2 ? true : false;
g_sci->_gfxPalette->kernelSetFromResource(resourceId, force);
} else {
warning("kPalette(1) called with %d parameters", argc);