GLK: ADVSYS: Initialization fixes

This commit is contained in:
Paul Gilbert 2019-06-13 19:43:34 -07:00
parent 8759a9e851
commit 4f7c9899f2
3 changed files with 3 additions and 4 deletions

View File

@ -27,7 +27,7 @@ namespace AdvSys {
bool GlkInterface::initialize() {
_window = glk_window_open(0, 0, 0, wintype_TextBuffer, 1);
return !_window;
return _window != nullptr;
}
void GlkInterface::print(const Common::String &msg) {

View File

@ -104,8 +104,7 @@ ExecutionResult VM::execute(int offset) {
void VM::executeOpcode() {
// Get next opcode
uint opcode = getCodeByte(_pc);
++_pc;
uint opcode = readCodeByte();
if (opcode >= OP_BRT && opcode <= OP_VOWEL) {
(this->*_METHODS[(int)opcode - 1])();

View File

@ -165,7 +165,7 @@ public:
/**
* Constructor
*/
FunctionPointer(FixedStack &s) : _stack(s), _index(-1) {}
FunctionPointer(FixedStack &s) : _stack(s), _index(0) {}
/**
* Array indexing