for (; EntryCount--; ResEntry++) {
/* Scan entries for equal name */
if (ResEntry->Name & 0x80000000) {
- ws = (PWCHAR)((ULONG)ResDir + (ResEntry->Name & 0x7FFFFFFF));
- if (!wcsncmp((PWCHAR)Id, ws + 1, *ws) &&
+ ws = (PWCHAR)((ULONG)ResBase + (ResEntry->Name & 0x7FFFFFFF));
+ if (!_wcsnicmp((PWCHAR)Id, ws + 1, *ws) &&
wcslen((PWCHAR)Id) == (int)*ws) {
goto found;
}