Fix crashing system name display on unknown Windows version
The calling GKrellM code always expects a system name that can be split at the first space character to provide kernel name and kernel version. Return a string containing a space to avoid a crash on any Windows version the code does not know about (or in case querying the version failed).
This commit is contained in:
parent
68a1dfd5f7
commit
d4fe37aef1
|
@ -1895,7 +1895,7 @@ gchar *gkrellm_sys_get_system_name(void)
|
|||
gkrellm_debug(DEBUG_SYSDEP, "Retrieving system name\n");
|
||||
|
||||
// Default value for sysname
|
||||
g_strlcpy(sysname, "Unknown", sizeof(sysname));
|
||||
g_strlcpy(sysname, "Windows Unknown", sizeof(sysname));
|
||||
|
||||
// Query version info
|
||||
memset(&vi, 0, sizeof(OSVERSIONINFOEXW));
|
||||
|
|
Loading…
Reference in New Issue