Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug for windows-arm64 (introduced in pull request #291) #353

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/define_introspection.inl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ static void (*const kSetters[])(FEAT_TYPE_NAME*, bool) = {INTROSPECTION_TABLE};
// Implements the `GetXXXFeaturesEnumValue` API.
int GET_FEAT_ENUM_VALUE(const FEAT_TYPE_NAME* features, FEAT_ENUM_NAME value) {
if (value >= FEAT_ENUM_LAST) return false;
if (value >= sizeof(kGetters)/sizeof(kGetters[0])) return false;
return kGetters[value](features);
}

Expand All @@ -82,5 +83,6 @@ static const char* kFeatureNames[] = {INTROSPECTION_TABLE};
// Implements the `GetXXXFeaturesEnumName` API.
const char* GET_FEAT_ENUM_NAME(FEAT_ENUM_NAME value) {
if (value >= FEAT_ENUM_LAST) return "unknown_feature";
if (value >= sizeof(kFeatureNames)/sizeof(kFeatureNames[0])) return "unknown_feature";
return kFeatureNames[value];
}