From 068487201327ae87599205cc04cf61220cbcd98f Mon Sep 17 00:00:00 2001 From: bicarus-dev <202771338+bicarus-dev@users.noreply.github.com> Date: Sat, 3 Oct 2026 15:23:38 -0700 Subject: [PATCH] fix error printing for dll info --- src/spice2x/util/libutils.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/spice2x/util/libutils.cpp b/src/spice2x/util/libutils.cpp index 79b67e25..c88f216c 100644 --- a/src/spice2x/util/libutils.cpp +++ b/src/spice2x/util/libutils.cpp @@ -404,13 +404,11 @@ void libutils::print_dll_info(std::filesystem::path filename) { const auto size = GetFileVersionInfoSizeW(filename.wstring().c_str(), &handle); if (size == 0) { const auto error = GetLastError(); - const auto error_message = get_last_error_string(); log_misc( "libutils", - "GetFileVersionInfoSizeW failed for {}: {} (Win32 error {}); " + "GetFileVersionInfoSizeW failed for {}: Win32 error {}; " "DLL may have no version resource", filename, - error_message, error); print_summary(); return; @@ -419,12 +417,10 @@ void libutils::print_dll_info(std::filesystem::path filename) { auto data = util::make_unique_plain(size); if (!GetFileVersionInfoW(filename.wstring().c_str(), handle, size, data.get())) { const auto error = GetLastError(); - const auto error_message = get_last_error_string(); log_misc( "libutils", - "GetFileVersionInfoW failed for {}: {} (Win32 error {})", + "GetFileVersionInfoW failed for {}: Win32 error {}", filename, - error_message, error); print_summary(); return;