From: David Wrighton Date: Wed, 17 May 2023 01:02:01 +0000 (-0700) Subject: Fix incorrect usage of u16_strcmp instead of u16_strncmp (#86356) X-Git-Tag: accepted/tizen/unified/riscv/20231226.055536~2177 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f2c6103051508c0cd3d921a5e6f6ccf217cccd7;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix incorrect usage of u16_strcmp instead of u16_strncmp (#86356) --- diff --git a/src/coreclr/md/compiler/emit.cpp b/src/coreclr/md/compiler/emit.cpp index 62fa88fcda3..f2df925feaa 100644 --- a/src/coreclr/md/compiler/emit.cpp +++ b/src/coreclr/md/compiler/emit.cpp @@ -114,7 +114,7 @@ STDMETHODIMP RegMeta::DefineMethod( // S_OK or error. if (!u16_strcmp(szName, W(".ctor")) || // COR_CTOR_METHOD_NAME_W !u16_strcmp(szName, W(".cctor")) || // COR_CCTOR_METHOD_NAME_W - !u16_strcmp(szName, W("_VtblGap")) ) + !u16_strncmp(szName, W("_VtblGap"), 8) ) // All methods that begin with the characters "_VtblGap" are considered to be VTable Gap methods { dwMethodFlags |= mdRTSpecialName | mdSpecialName; }