wscript/tests: Get rid of mystrchr.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-02-03 20:45:48 +01:00 committed by Alexandre Julliard
parent 3324137f72
commit f90be6e1ac
1 changed files with 1 additions and 12 deletions

View File

@ -74,17 +74,6 @@ static const GUID CLSID_TestObj =
static const char *script_name;
static HANDLE wscript_process;
static const WCHAR* mystrrchr(const WCHAR *str, WCHAR ch)
{
const WCHAR *pos = NULL, *current = str;
while(*current != 0) {
if(*current == ch)
pos = current;
++current;
}
return pos;
}
static BSTR a2bstr(const char *str)
{
BSTR ret;
@ -232,7 +221,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF
res = GetModuleFileNameExW(wscript_process, NULL, fullPath, ARRAY_SIZE(fullPath));
if(res == 0)
return E_FAIL;
pos = mystrrchr(fullPath, '\\');
pos = wcsrchr(fullPath, '\\');
if(!(V_BSTR(pVarResult) = SysAllocStringLen(fullPath, pos-fullPath)))
return E_OUTOFMEMORY;
break;