Commit d4032d69 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wbemprox: Handle escaped backslashes in LIKE queries.

parent e8aa254f
...@@ -93,6 +93,7 @@ static BOOL eval_like( const WCHAR *lstr, const WCHAR *rstr ) ...@@ -93,6 +93,7 @@ static BOOL eval_like( const WCHAR *lstr, const WCHAR *rstr )
while (*p && *q) while (*p && *q)
{ {
if (q[0] == '\\' && q[1] == '\\') q++;
if (*q == '%') if (*q == '%')
{ {
while (*q == '%') q++; while (*q == '%') q++;
......
...@@ -1171,6 +1171,16 @@ static void test_Win32_NetworkAdapter( IWbemServices *services ) ...@@ -1171,6 +1171,16 @@ static void test_Win32_NetworkAdapter( IWbemServices *services )
IEnumWbemClassObject_Release( result ); IEnumWbemClassObject_Release( result );
SysFreeString( query ); SysFreeString( query );
query = SysAllocString( L"SELECT * FROM Win32_NetworkAdapter WHERE PNPDeviceID LIKE \"PCI\\\\%\"" );
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
ok( hr == S_OK, "got %08x\n", hr );
SysFreeString( query );
query = SysAllocString( L"SELECT * FROM Win32_NetworkAdapter WHERE PNPDeviceID LIKE \"PCI\\%\"" );
hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
todo_wine ok( hr == WBEM_E_INVALID_QUERY, "got %08x\n", hr );
SysFreeString( query );
SysFreeString( wql ); SysFreeString( wql );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment