diff options
Diffstat (limited to 'engines/zvision/scripting/controls/slot_control.cpp')
-rw-r--r-- | engines/zvision/scripting/controls/slot_control.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/zvision/scripting/controls/slot_control.cpp b/engines/zvision/scripting/controls/slot_control.cpp index 292a2b4bc9..42b54a9ab5 100644 --- a/engines/zvision/scripting/controls/slot_control.cpp +++ b/engines/zvision/scripting/controls/slot_control.cpp @@ -34,7 +34,9 @@ namespace ZVision { SlotControl::SlotControl(ZVision *engine, uint32 key, Common::SeekableReadStream &stream) - : Control(engine, key, CONTROL_SLOT) { + : Control(engine, key, CONTROL_SLOT), + _cursor(CursorIndex_Active), + _distanceId('0') { _renderedItem = 0; _bkg = NULL; @@ -74,7 +76,7 @@ SlotControl::SlotControl(ZVision *engine, uint32 key, Common::SeekableReadStream } else if (param.matchString("eligible_objects", true)) { char buf[256]; memset(buf, 0, 256); - strcpy(buf, values.c_str()); + strncpy(buf, values.c_str(), 255); char *curpos = buf; char *strend = buf + strlen(buf); |