mirror of
https://github.com/glfw/glfw.git
synced 2025-06-25 08:57:43 +00:00
Check whether locales are the empty string and ignore them if they are.
This fixes a confusing error in compiling the xkb compose table if LC_ALL, LC_CTYPE, or LANG are set to the empty string.
This commit is contained in:
parent
e7ea71be03
commit
15f9e1bea7
@ -1682,11 +1682,11 @@ static void keyboardHandleKeymap(void* userData,
|
|||||||
|
|
||||||
// Look up the preferred locale, falling back to "C" as default.
|
// Look up the preferred locale, falling back to "C" as default.
|
||||||
locale = getenv("LC_ALL");
|
locale = getenv("LC_ALL");
|
||||||
if (!locale)
|
if (!locale || strlen(locale) == 0)
|
||||||
locale = getenv("LC_CTYPE");
|
locale = getenv("LC_CTYPE");
|
||||||
if (!locale)
|
if (!locale || strlen(locale) == 0)
|
||||||
locale = getenv("LANG");
|
locale = getenv("LANG");
|
||||||
if (!locale)
|
if (!locale || strlen(locale) == 0)
|
||||||
locale = "C";
|
locale = "C";
|
||||||
|
|
||||||
composeTable =
|
composeTable =
|
||||||
|
Loading…
Reference in New Issue
Block a user