diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index e047c5e8..37178413 100644 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -122,12 +122,9 @@ static PERF_OBJECT_TYPE *get_perf_object(sigar_t *sigar, char *counter_key, * confucius say what the fuck. */ if (object->NumInstances == PERF_NO_INSTANCES) { - bytes = - (block->TotalByteLength - - block->HeaderLength - - object->TotalByteLength); + int i; - for (; bytes > 0; bytes -= object->TotalByteLength) { + for (i=0; iNumObjectTypes; i++) { if (object->NumInstances != PERF_NO_INSTANCES) { return object; }