Fix OS version minor calculation and error macro

This commit is contained in:
Serenity
2025-06-04 21:37:34 -07:00
parent 669b484a74
commit e0b18cc26e
2 changed files with 2 additions and 2 deletions

View File

@@ -2,4 +2,4 @@
#define RtlSetLastWin32ErrorAndNtStatusFromNtStatus(Status) \
SetLastError(RtlNtStatusToDosError(Status))
#define RtlGetLastWin32ErrorAndNtStatusFromNtStatus(Status) \
GetLastError(RtlNtStatusToDosError(Status))
(SetLastError(RtlNtStatusToDosError(Status)), GetLastError())

View File

@@ -229,7 +229,7 @@ void GetSystemOSVersion_X(LPSYSTEMOSVERSIONINFO VersionInformation) {
int edx = cpuInfo[3];
VersionInformation->MajorVersion = LOBYTE(ebx); // Lowest 8 bits of EBX
VersionInformation->MinorVersion = HIBYTE(HIDWORD(eax)); // Highest 8 bits of EAX
VersionInformation->MinorVersion = HIBYTE(HIWORD(eax)); // Highest 8 bits of EAX
VersionInformation->Revision = LOWORD(edx); // Lowest 16 bits of EDX
VersionInformation->BuildNumber = LOWORD(eax); // Lowest 16 bits of EAX