Fix a few more where we need to specify number of TCHARs rather than sizeof buffer
This commit is contained in:
1 parent
2fd3beab06
commit
f448bae54e
4 files changed
+7
-6
No files matched your search
+1
-1
@@ -303,7 +303,7 @@ int sigar_cpu_info_get(sigar_t *sigar, sigar_cpu_info_t *info)
|
||||
"HARDWARE\\DESCRIPTION\\System\\CentralProcessor", &key);
|
||||
|
||||
//just lookup the first id, then assume all cpus are the same.
|
||||
rc = RegEnumKey(key, 0, id, sizeof(id));
|
||||
rc = RegEnumKey(key, 0, id, sizeof(id)/sizeof(TCHAR));
|
||||
if (rc != ERROR_SUCCESS) {
|
||||
RegCloseKey(key);
|
||||
return rc;
|
||||
|
||||
Reference in new issue
Block a user