mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed protection string table oob
This commit is contained in:
parent
b227197e54
commit
f28229aef4
2 changed files with 7 additions and 4 deletions
|
@ -56,7 +56,9 @@ enum BfProtection : uint8
|
||||||
BfProtection_Internal,
|
BfProtection_Internal,
|
||||||
BfProtection_Protected,
|
BfProtection_Protected,
|
||||||
BfProtection_ProtectedInternal,
|
BfProtection_ProtectedInternal,
|
||||||
BfProtection_Public
|
BfProtection_Public,
|
||||||
|
|
||||||
|
BfProtection_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BfCheckedKind : int8
|
enum BfCheckedKind : int8
|
||||||
|
|
|
@ -7818,7 +7818,7 @@ BF_NOINLINE void BfModule::EvaluateWithNewScope(BfExprEvaluator& exprEvaluator,
|
||||||
newScope.mAllowTargeting = false;
|
newScope.mAllowTargeting = false;
|
||||||
mCurMethodState->AddScope(&newScope);
|
mCurMethodState->AddScope(&newScope);
|
||||||
NewScopeState();
|
NewScopeState();
|
||||||
exprEvaluator.mBfEvalExprFlags = flags;
|
exprEvaluator.mBfEvalExprFlags = (BfEvalExprFlags)(exprEvaluator.mBfEvalExprFlags | flags);
|
||||||
exprEvaluator.Evaluate(expr, (flags & BfEvalExprFlags_PropogateNullConditional) != 0, (flags & BfEvalExprFlags_IgnoreNullConditional) != 0, (flags & BfEvalExprFlags_AllowSplat) != 0);
|
exprEvaluator.Evaluate(expr, (flags & BfEvalExprFlags_PropogateNullConditional) != 0, (flags & BfEvalExprFlags_IgnoreNullConditional) != 0, (flags & BfEvalExprFlags_AllowSplat) != 0);
|
||||||
RestoreScopeState();
|
RestoreScopeState();
|
||||||
}
|
}
|
||||||
|
@ -7850,7 +7850,7 @@ BfTypedValue BfModule::CreateValueFromExpression(BfExprEvaluator& exprEvaluator,
|
||||||
*outOrigType = NULL;
|
*outOrigType = NULL;
|
||||||
|
|
||||||
exprEvaluator.mExpectingType = wantTypeRef;
|
exprEvaluator.mExpectingType = wantTypeRef;
|
||||||
exprEvaluator.mBfEvalExprFlags = flags;
|
exprEvaluator.mBfEvalExprFlags = (BfEvalExprFlags)(exprEvaluator.mBfEvalExprFlags | flags);
|
||||||
exprEvaluator.mExplicitCast = (flags & BfEvalExprFlags_ExplicitCast) != 0;
|
exprEvaluator.mExplicitCast = (flags & BfEvalExprFlags_ExplicitCast) != 0;
|
||||||
|
|
||||||
if ((flags & BfEvalExprFlags_CreateConditionalScope) != 0)
|
if ((flags & BfEvalExprFlags_CreateConditionalScope) != 0)
|
||||||
|
@ -22577,7 +22577,8 @@ void BfModule::CheckOverridenMethod(BfMethodInstance* methodInstance, BfMethodIn
|
||||||
auto prevProtection = methodOverriden->mMethodDef->mProtection;
|
auto prevProtection = methodOverriden->mMethodDef->mProtection;
|
||||||
if ((methodDef->mProtection != prevProtection) && (methodDef->mMethodType != BfMethodType_Dtor))
|
if ((methodDef->mProtection != prevProtection) && (methodDef->mMethodType != BfMethodType_Dtor))
|
||||||
{
|
{
|
||||||
const char* protectionNames[] = { "hidden", "private", "internal", "protected", "public" };
|
const char* protectionNames[] = { "hidden", "private", "internal", "protected", "protected internal", "public" };
|
||||||
|
BF_STATIC_ASSERT(BF_ARRAY_COUNT(protectionNames) == BfProtection_COUNT);
|
||||||
BfAstNode* protectionRefNode = NULL;
|
BfAstNode* protectionRefNode = NULL;
|
||||||
if (auto propertyMethodDeclaration = methodDef->GetPropertyMethodDeclaration())
|
if (auto propertyMethodDeclaration = methodDef->GetPropertyMethodDeclaration())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue