Skip to content

Commit

Permalink
Fix: segfault on Windows due to faulty variant access (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
omgitsmoe authored Feb 12, 2024
1 parent f246493 commit ae411a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/windows/disk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ std::vector<Disk> getAllDisks() {
}
hr = obj->Get(L"Size", 0, &vt_prop, nullptr, nullptr);
if (SUCCEEDED(hr)) {
disk._size_Bytes = std::stoll(utils::wstring_to_std_string(vt_prop.bstrVal));
disk._size_Bytes = static_cast<int64_t>(vt_prop.ullVal);
}
VariantClear(&vt_prop);
obj->Release();
Expand Down

0 comments on commit ae411a7

Please sign in to comment.