diff options
author | Filippos Karapetis | 2010-01-30 01:14:25 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-30 01:14:25 +0000 |
commit | 42ec4e37801b7724380437033c86180e79b9a67a (patch) | |
tree | 7096a2c75a518479e0700504220f02b05443c0d8 /engines/sci/engine/kernel32.cpp | |
parent | 49cfbbaffc923b50c8467b3f98d5fe434fddf590 (diff) | |
download | scummvm-rg350-42ec4e37801b7724380437033c86180e79b9a67a.tar.gz scummvm-rg350-42ec4e37801b7724380437033c86180e79b9a67a.tar.bz2 scummvm-rg350-42ec4e37801b7724380437033c86180e79b9a67a.zip |
Ignore kString(printBuf) calls with more parameters than 3 - a list is probably used
svn-id: r47693
Diffstat (limited to 'engines/sci/engine/kernel32.cpp')
-rw-r--r-- | engines/sci/engine/kernel32.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel32.cpp b/engines/sci/engine/kernel32.cpp index b866c2dada..6a112af0a3 100644 --- a/engines/sci/engine/kernel32.cpp +++ b/engines/sci/engine/kernel32.cpp @@ -617,7 +617,14 @@ reg_t kString(EngineState *s, int argc, reg_t *argv) { warning("kString(Printf)"); break; case 12: // Printf Buf - return kFormat(s, argc - 1, argv + 1); + if (argc == 3) + return kFormat(s, argc - 1, argv + 1); + else + // TODO + // For some reason, argc > 3 crashes, e.g. in Torin full (there's a format + // string %s%s, but the string passed for the first %s is invalid). Perhaps + // a list is passed in this case? + warning("kString(PrintBuf) - parameter count %d not supported", argc); break; case 13: { // atoi Common::String string = s->_segMan->getString(argv[1]); |