aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/schedule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hugo/schedule.cpp')
-rw-r--r--engines/hugo/schedule.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index 384b3ace8f..896e8fa2ce 100644
--- a/engines/hugo/schedule.cpp
+++ b/engines/hugo/schedule.cpp
@@ -1104,7 +1104,7 @@ void Scheduler::restoreEvents(Common::ReadStream *f) {
if ((index == -1) && (subElem == -1))
_events[i].action = 0;
else
- _events[i].action = (act*)&_actListArr[index][subElem];
+ _events[i].action = (act *)&_actListArr[index][subElem];
_events[i].localActionFl = (f->readByte() == 1) ? true : false;
_events[i].time = f->readUint32BE();
@@ -1539,7 +1539,7 @@ void Scheduler_v1d::promptAction(act *action) {
response.toLowercase();
char resp[256];
- strncpy(resp, response.c_str(), 256);
+ Common::strlcpy(resp, response.c_str(), 256);
if (action->a3.encodedFl)
decodeString(resp);
@@ -1585,12 +1585,9 @@ void Scheduler_v2d::promptAction(act *action) {
bool found = false;
const char *tmpStr; // General purpose string ptr
- char resp[256];
- strncpy(resp, response.c_str(), 256);
-
for (int dx = 0; !found && (action->a3.responsePtr[dx] != -1); dx++) {
tmpStr = _vm->_file->fetchString(action->a3.responsePtr[dx]);
- if (strstr(Utils::strlwr(resp), tmpStr))
+ if (response.contains(tmpStr))
found = true;
}