Răsfoiți Sursa

libobs: Convert security product name to UTF-8 for logging

Co-Authored-By: gkvjwa <[email protected]>
Richard Stanway 2 ani în urmă
părinte
comite
c57a291316
1 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 6 1
      libobs/obs-windows.c

+ 6 - 1
libobs/obs-windows.c

@@ -316,9 +316,14 @@ static void log_security_products_by_type(IWSCProductList *prod_list, int type)
 			continue;
 		}
 
-		blog(LOG_INFO, "\t%S: %s (%s)", name,
+		char *product_name;
+		os_wcs_to_utf8_ptr(name, 0, &product_name);
+
+		blog(LOG_INFO, "\t%s: %s (%s)", product_name,
 		     get_str_for_state(prod_state), get_str_for_type(type));
 
+		bfree(product_name);
+
 		SysFreeString(name);
 		prod->lpVtbl->Release(prod);
 	}