lfreist / hwinfo

cross platform C++ library for hardware information (CPU, RAM, GPU, ...)
MIT License
433 stars 74 forks source link

Fix: segfault on Windows due to faulty variant access #77

Closed omgitsmoe closed 6 months ago

omgitsmoe commented 6 months ago

Win32_DiskDrive.Size is a uint64, but was being accessed as string value, which resulted in a nullptr dereference.

Hope the static_cast is fine, otherwise you'd need to change the type to an uint64_t.