(SIGAR-186) fix Win32.getFileVersion on windows 2000

This commit is contained in:
Doug MacEachern 2009-10-23 14:49:44 -07:00
parent 6b9ac77afa
commit 6eef4f7cdc
1 changed files with 1 additions and 1 deletions

2
src/os/win32/win32_sigar.c Normal file → Executable file
View File

@ -3705,7 +3705,7 @@ int sigar_file_version_get(sigar_file_version_t *version,
data = malloc(len); data = malloc(len);
if (GetFileVersionInfo(name, handle, len, data)) { if (GetFileVersionInfo(name, handle, len, data)) {
if (VerQueryValue(data, "\\", &info, 0)) { if (VerQueryValue(data, "\\", &info, &len)) {
version->product_major = HIWORD(info->dwProductVersionMS); version->product_major = HIWORD(info->dwProductVersionMS);
version->product_minor = LOWORD(info->dwProductVersionMS); version->product_minor = LOWORD(info->dwProductVersionMS);
version->product_build = HIWORD(info->dwProductVersionLS); version->product_build = HIWORD(info->dwProductVersionLS);