diff --git a/oscar64/Declaration.cpp b/oscar64/Declaration.cpp index cfb7b11..883c19d 100644 --- a/oscar64/Declaration.cpp +++ b/oscar64/Declaration.cpp @@ -1167,7 +1167,7 @@ Expression* Expression::ConstantFold(Errors * errors, LinkerSection * dataSectio return ex; } else if (mType == EX_BINARY && mToken == TK_ADD && mLeft->mType == EX_VARIABLE && mLeft->mDecValue->mType == DT_VARIABLE && (mLeft->mDecValue->mFlags & DTF_CONST) && - mLeft->mDecValue && mRight->mDecValue && mLeft->mDecValue->mValue->mType == EX_CONSTANT && + mLeft->mDecValue && mRight->mDecValue && mLeft->mDecValue->mValue && mLeft->mDecValue->mValue->mType == EX_CONSTANT && mLeft->mDecType->mType == DT_TYPE_POINTER && mRight->mType == EX_CONSTANT && mRight->mDecValue->mType == DT_CONST_INTEGER) { mLeft = mLeft->mDecValue->mValue;