lfreist / hwinfo

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

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

Closed omgitsmoe closed 9 months ago

omgitsmoe commented 9 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.