From 47e55f16646403a1dea870231e4f294c0858b9a7 Mon Sep 17 00:00:00 2001 From: uruk Date: Sun, 18 May 2014 14:15:13 +0200 Subject: CGE2: Initialize _actions[] in SprExt's constructor. --- engines/cge2/vga13h.cpp | 8 ++++++++ engines/cge2/vga13h.h | 5 +---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'engines/cge2') diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index fc5f9b4fa6..51a8c107ef 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -72,6 +72,14 @@ Seq Sprite::_stdSeq8[] = { 7, 7, 0, 0, 0, 0 }, }; +SprExt::SprExt(CGE2Engine *vm) + : _p0(vm, 0, 0), _p1(vm, 0, 0), + _b0(NULL), _b1(NULL), _shpList(NULL), + _location(0), _seq(NULL), _name(NULL) { + for (int i = 0; i < kActions; i++) + _actions[i] = nullptr; +} + Sprite::Sprite(CGE2Engine *vm) : _siz(_vm, 0, 0), _seqPtr(kNoSeq), _seqCnt(0), _shpCnt(0), _next(NULL), _prev(NULL), _time(0), diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h index 894f7b7019..8f73f42375 100644 --- a/engines/cge2/vga13h.h +++ b/engines/cge2/vga13h.h @@ -71,10 +71,7 @@ public: Seq *_seq; char *_name; CommandHandler::Command *_actions[kActions]; - SprExt(CGE2Engine *vm) : _p0(vm, 0, 0), _p1(vm, 0, 0), - _b0(NULL), _b1(NULL),_shpList(NULL), _location(0), - _seq(NULL), _name(NULL) - {} + SprExt(CGE2Engine *vm); }; class Sprite { -- cgit v1.2.3