aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorTorbjörn Andersson2012-09-14 20:22:12 +0200
committerTorbjörn Andersson2012-09-14 20:22:12 +0200
commitbf27ff1438ff0a85ed3888e55c39f0509a109335 (patch)
treed0fbd98b20b7b848b4af201e46f57e360ef2f30b /engines/dreamweb
parent486f04b7614a633d39cf4633797a8baa790bb95b (diff)
downloadscummvm-rg350-bf27ff1438ff0a85ed3888e55c39f0509a109335.tar.gz
scummvm-rg350-bf27ff1438ff0a85ed3888e55c39f0509a109335.tar.bz2
scummvm-rg350-bf27ff1438ff0a85ed3888e55c39f0509a109335.zip
DREAMWEB: Increase _operand1 buffer size
Theoretically, it should be almost as big as _inputLine, so let's make them the exact same size just for simplicity. This fixes crashes for me when trying to use very long parameters to the monitor's READ command, and could possibly fix a bug reported in the German version where you supposedly have to read "kurzmitteilung".
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamweb.h2
-rw-r--r--engines/dreamweb/monitor.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index 1f6deb8566..a4597b1867 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -196,7 +196,7 @@ protected:
// from monitor.cpp
char _inputLine[64];
- char _operand1[14];
+ char _operand1[64];
char _currentFile[14];
// from newplace.cpp
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 4e9d8eecc1..1886a80b6a 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -194,7 +194,7 @@ void DreamWebEngine::printLogo() {
}
void DreamWebEngine::input() {
- memset(_inputLine, 0, 64);
+ memset(_inputLine, 0, sizeof(_inputLine));
_curPos = 0;
printChar(_monitorCharset, _monAdX, _monAdY, '>', 0, NULL, NULL);
multiDump(_monAdX, _monAdY, 6, 8);
@@ -665,7 +665,7 @@ void DreamWebEngine::searchForFiles(const char *filesString) {
const char *DreamWebEngine::parser() {
char *output = _operand1;
- memset(output, 0, 14);
+ memset(output, 0, sizeof(_operand1));
*output++ = '=';