(SIGAR-186) fix Win32.getFileVersion on windows 2000
This commit is contained in:
parent
6b9ac77afa
commit
6eef4f7cdc
|
@ -3705,7 +3705,7 @@ int sigar_file_version_get(sigar_file_version_t *version,
|
|||
data = malloc(len);
|
||||
|
||||
if (GetFileVersionInfo(name, handle, len, data)) {
|
||||
if (VerQueryValue(data, "\\", &info, 0)) {
|
||||
if (VerQueryValue(data, "\\", &info, &len)) {
|
||||
version->product_major = HIWORD(info->dwProductVersionMS);
|
||||
version->product_minor = LOWORD(info->dwProductVersionMS);
|
||||
version->product_build = HIWORD(info->dwProductVersionLS);
|
||||
|
|
Loading…
Reference in New Issue