diff --git a/oscar64/GlobalAnalyzer.cpp b/oscar64/GlobalAnalyzer.cpp index 0714be1..1789dd8 100644 --- a/oscar64/GlobalAnalyzer.cpp +++ b/oscar64/GlobalAnalyzer.cpp @@ -364,7 +364,9 @@ Declaration * GlobalAnalyzer::Analyze(Expression* exp, Declaration* procDec) if (ldec->mType == DT_VARIABLE || ldec->mType == DT_ARGUMENT) ldec = ldec->mBase; rdec = Analyze(exp->mRight, procDec); - return ldec->mBase; + if (ldec->mBase) + return ldec->mBase; + break; case EX_QUALIFY: Analyze(exp->mLeft, procDec); return exp->mDecValue->mBase; diff --git a/oscar64/InterCodeGenerator.cpp b/oscar64/InterCodeGenerator.cpp index cf012be..9391c76 100644 --- a/oscar64/InterCodeGenerator.cpp +++ b/oscar64/InterCodeGenerator.cpp @@ -1990,7 +1990,7 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration* if (exp->mRight->mType == EX_LIST) { Expression* tex = exp->mRight->mLeft, * sex = exp->mRight->mRight->mLeft, * nex = exp->mRight->mRight->mRight; - if (nex->mDecValue->mType == DT_CONST_INTEGER && nex->mDecValue->mInteger < 128) + if (nex->mType == EX_CONSTANT && nex->mDecValue->mType == DT_CONST_INTEGER && nex->mDecValue->mInteger < 128) { vl = TranslateExpression(procType, proc, block, tex, breakBlock, continueBlock, inlineMapper); if (vl.mType->mType == DT_TYPE_ARRAY)