diff options
author | Filippos Karapetis | 2010-07-29 07:58:48 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-07-29 07:58:48 +0000 |
commit | c40b9801dfbde95761521aa560ea1425fded527b (patch) | |
tree | 3b870caef27dec7994b89e3fc1b2e965a27a71f4 | |
parent | 3e6f3716acfcc042816f12a9321ad009b389aaf6 (diff) | |
download | scummvm-rg350-c40b9801dfbde95761521aa560ea1425fded527b.tar.gz scummvm-rg350-c40b9801dfbde95761521aa560ea1425fded527b.tar.bz2 scummvm-rg350-c40b9801dfbde95761521aa560ea1425fded527b.zip |
SCI: Silenced warning when exiting in LSL6 (bug report #3035533), and commented out a related unused variable in kSetQuitStr
svn-id: r51456
-rw-r--r-- | engines/sci/engine/kstring.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/message.cpp | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 3a7bb30c80..9254bce9c1 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -566,7 +566,7 @@ reg_t kMessage(EngineState *s, int argc, reg_t *argv) { } reg_t kSetQuitStr(EngineState *s, int argc, reg_t *argv) { - Common::String quitStr = s->_segMan->getString(argv[0]); + //Common::String quitStr = s->_segMan->getString(argv[0]); //debug("Setting quit string to '%s'", quitStr.c_str()); return s->r_acc; } diff --git a/engines/sci/engine/message.cpp b/engines/sci/engine/message.cpp index 18e60eb521..8842789c5f 100644 --- a/engines/sci/engine/message.cpp +++ b/engines/sci/engine/message.cpp @@ -380,7 +380,15 @@ void MessageState::outputString(reg_t buf, const Common::String &str) { if ((unsigned)buffer_r.maxSize >= str.size() + 1) { _segMan->strcpy(buf, str.c_str()); } else { - warning("Message: buffer %04x:%04x invalid or too small to hold the following text of %i bytes: '%s'", PRINT_REG(buf), str.size() + 1, str.c_str()); + // LSL6 sets an exit text here, but the buffer size allocated + // is too small. Don't display a warning in this case, as we + // don't use the exit text anyway - bug report #3035533 + const char *foo = str.c_str(); + if (g_sci->getGameId() == GID_LSL6 && str.hasPrefix("\r\n(c) 1993 Sierra On-Line, Inc")) { + // LSL6 buggy exit text, don't show warning + } else { + warning("Message: buffer %04x:%04x invalid or too small to hold the following text of %i bytes: '%s'", PRINT_REG(buf), str.size() + 1, str.c_str()); + } // Set buffer to empty string if possible if (buffer_r.maxSize > 0) |