aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2009-05-08 23:10:25 +0000
committerWalter van Niftrik2009-05-08 23:10:25 +0000
commitbe7acea2172457121d079c9c4c8ffa67aeecf2a7 (patch)
tree1e62ba3a66da64da771d65a96bcc96c10dca2b42
parent589d1dbd5945285f9b32d3bd03b7ff54b1befb3f (diff)
downloadscummvm-rg350-be7acea2172457121d079c9c4c8ffa67aeecf2a7.tar.gz
scummvm-rg350-be7acea2172457121d079c9c4c8ffa67aeecf2a7.tar.bz2
scummvm-rg350-be7acea2172457121d079c9c4c8ffa67aeecf2a7.zip
SCI: Set signature for GetMessage.
svn-id: r40396
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/kstring.cpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 2c4ebdb68e..a049abb735 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -201,7 +201,7 @@ SciKernelFunction kfunct_mappers[] = {
/*(?)*/ DEFUN("TimesCot", kTimesCot, "ii"),
/*(?)*/ DEFUN("TimesTan", kTimesTan, "ii"),
DEFUN("Message", kMessage, ".*"),
- DEFUN("GetMessage", kGetMessage, ".*"),
+ DEFUN("GetMessage", kGetMessage, "iiir"),
DEFUN("DoAudio", kDoAudio, ".*"),
DEFUN("DoSync", kDoSync, ".*"),
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 3a92424b56..005440f679 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -786,7 +786,7 @@ reg_t kGetMessage(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (!state.initialized)
message_state_initialize(s->resmgr, &state);
- char *buffer = argc == 4 ? kernel_dereference_char_pointer(s, argv[3], 0) : NULL;
+ char *buffer = kernel_dereference_char_pointer(s, argv[3], 0);
MessageTuple tuple;
tuple.noun = UKPV(0);
@@ -795,10 +795,8 @@ reg_t kGetMessage(EngineState *s, int funct_nr, int argc, reg_t *argv) {
tuple.cond = 0;
tuple.seq = 0;
- if (state.loadRes(module) && state.getSpecific(&tuple)) {
- if (buffer)
- state.getText(buffer, 255);
-
+ if (buffer && state.loadRes(module) && state.getSpecific(&tuple)) {
+ state.getText(buffer, 255);
return argv[3];
} else {
return NULL_REG;