aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/glk/frotz/processor.cpp6
-rw-r--r--engines/glk/frotz/processor.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/frotz/processor.cpp
index 8cfff9cd1b..5553b04595 100644
--- a/engines/glk/frotz/processor.cpp
+++ b/engines/glk/frotz/processor.cpp
@@ -176,8 +176,10 @@ Processor::Processor(OSystem *syst, const GlkGameDescription &gameDesc) :
&Processor::z_call_n
};
- Common::copy(&OP0_OPCODES[0], &OP0_OPCODES[16], op0_opcodes);
- Common::copy(&OP1_OPCODES[0], &OP1_OPCODES[16], op1_opcodes);
+ op0_opcodes.resize(16);
+ op1_opcodes.resize(16);
+ Common::copy(&OP0_OPCODES[0], &OP0_OPCODES[16], &op0_opcodes[0]);
+ Common::copy(&OP1_OPCODES[0], &OP1_OPCODES[16], &op1_opcodes[0]);
Common::fill(&_stack[0], &_stack[STACK_SIZE], 0);
Common::fill(&zargs[0], &zargs[8], 0);
Common::fill(&_buffer[0], &_buffer[TEXT_BUFFER_SIZE], '\0');
diff --git a/engines/glk/frotz/processor.h b/engines/glk/frotz/processor.h
index 5d6d4487f9..9bb104c7c4 100644
--- a/engines/glk/frotz/processor.h
+++ b/engines/glk/frotz/processor.h
@@ -53,11 +53,11 @@ typedef void (Processor::*Opcode)();
class Processor : public GlkInterface, public virtual Mem {
friend class Quetzal;
private:
- Opcode op0_opcodes[16];
- Opcode op1_opcodes[16];
static const char *const ERR_MESSAGES[ERR_NUM_ERRORS];
static Opcode var_opcodes[64];
static Opcode ext_opcodes[64];
+ Common::Array<Opcode> op0_opcodes;
+ Common::Array<Opcode> op1_opcodes;
int _finished;
zword zargs[8];