-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Description
artifacts\obj\coreclr\browser.wasm.Debug\dlls\mscorrc\mscorrc.cppis not sorted by the ID.CompareNativeStringResourcesofsrc\coreclr\nativeresources\resourcestring.cppusesbsearch- emscripten bsearch is actually binary search not just linear scan.
Actual: Undefined resource string ID:0x1A88
Expected: Could not load file or assembly '%1'. %2
Workaround:
void *linearsearch(const void *key, const void *base, size_t nel, size_t width, int (*cmp)(const void *, const void *))
{
const char *p = (const char *)base;
for (size_t i = 0; i < nel; i++)
{
if (cmp(key, p) == 0)
return (void *)p;
p += width;
}
return NULL;
}
and
-NativeStringResource *resourceEntry = (NativeStringResource*)bsearch(
+NativeStringResource *resourceEntry = (NativeStringResource*)linearsearch(Reactions are currently unavailable