diff --git a/pdblocate/pdblocate.cpp b/pdblocate/pdblocate.cpp index 6644397f2..286e0e718 100644 --- a/pdblocate/pdblocate.cpp +++ b/pdblocate/pdblocate.cpp @@ -541,12 +541,13 @@ AddrInfo GetAddr(wstring req) { wcsncpy_s(ret.funcName, file, 126); + wchar_t *voidparam = wcsstr(ret.funcName, L"(void)"); + // remove stupid (void) for empty parameters - if(wcsstr(ret.funcName, L"(void)")) + if (voidparam != NULL) { - wchar_t *a = wcsstr(ret.funcName, L"(void)"); - *(a+1) = L')'; - *(a+2) = 0; + *(voidparam + 1) = L')'; + *(voidparam + 2) = 0; } }