diff --git a/src/coreclr/md/enc/metamodelrw.cpp b/src/coreclr/md/enc/metamodelrw.cpp index 34fe8b84e95c88..3fde673faa5c43 100644 --- a/src/coreclr/md/enc/metamodelrw.cpp +++ b/src/coreclr/md/enc/metamodelrw.cpp @@ -309,16 +309,15 @@ ULONG CMiniMdRW::m_TruncatedEncTables[] = ULONG CMiniMdRW::GetTableForToken( // Table index, or -1. mdToken tkn) // Token to find. { - ULONG ixTbl; // Loop control. ULONG type = TypeFromToken(tkn); // Get the type -- if a string, no associated table. if (type >= mdtString) return (ULONG) -1; // Table number is same as high-byte of token. - ixTbl = type >> 24; + ULONG ixTbl = type >> 24; // Make sure. - _ASSERTE(g_TblIndex[ixTbl].m_Token == type); + _ASSERTE(ixTbl < TBL_COUNT); return ixTbl; } // CMiniMdRW::GetTableForToken