X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdll%2Fwin32%2Fwbemprox%2Fquery.c;h=0d179b8afbd008cb8c798cb7415c17bffc41ff25;hp=869870a7e5d50e5cfb6bef06e41b659370bf7ad5;hb=37e2159e5441b483b1d9265fb271e40d05445295;hpb=5365e8d82907ea6d155320382903b1c15bc90e70 diff --git a/reactos/dll/win32/wbemprox/query.c b/reactos/dll/win32/wbemprox/query.c index 869870a7e5d..0d179b8afbd 100644 --- a/reactos/dll/win32/wbemprox/query.c +++ b/reactos/dll/win32/wbemprox/query.c @@ -51,10 +51,10 @@ static BOOL eval_like( const WCHAR *lstr, const WCHAR *rstr ) { while (*q == '%') q++; if (!*q) return TRUE; - while (*p && toupperW( p[1] ) != toupperW( q[1] )) p++; - if (!*p) return TRUE; + while (*p && *q && toupperW( *p ) == toupperW( *q )) { p++; q++; }; + if (!*p && !*q) return TRUE; } - if (toupperW( *p++ ) != toupperW( *q++ )) return FALSE; + if (*q != '%' && toupperW( *p++ ) != toupperW( *q++ )) return FALSE; } return TRUE; }