mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 00:03:58 +01:00
util/register: fix crashing when value string contains non-ascii chars
We can't use RegGetValueA because RegGetValueA converts wide string to non UTF-8 string, which results in crashing when printing
This commit is contained in:
@@ -7,6 +7,6 @@ void ffDetectCursor(const FFinstance* instance, FFCursorResult* result)
|
||||
FF_UNUSED(instance);
|
||||
|
||||
FF_HKEY_AUTO_DESTROY hKey;
|
||||
if(ffRegOpenKeyForRead(HKEY_CURRENT_USER, "Control Panel\\Cursors", &hKey, &result->error))
|
||||
if(ffRegOpenKeyForRead(HKEY_CURRENT_USER, L"Control Panel\\Cursors", &hKey, &result->error))
|
||||
ffRegReadStrbuf(hKey, NULL, &result->theme, &result->error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user