[SIGAR-70] fix length argument passed to PdhLookupPerfNameByIndex

This commit is contained in:
Doug MacEachern 2007-11-05 21:17:40 +00:00
parent 9d437eb281
commit b3d43367ef
1 changed files with 1 additions and 1 deletions

View File

@ -432,7 +432,7 @@ JNIEXPORT jstring SIGAR_JNI(win32_Pdh_pdhLookupPerfName)
(JNIEnv *env, jclass cur, jint index)
{
TCHAR path[MAX_PATH];
DWORD len = sizeof(path);
DWORD len = MAX_PATH; /* len is number of TCHAR's, not sizeof(path) */
PDH_STATUS status =
PdhLookupPerfNameByIndex(NULL, index, path, &len);