aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-04-12 16:31:32 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-04-12 16:31:32 +0900
commit1db14b547a16f0435acc788b2cca9e7fdc43018c (patch)
treedefce53c273a3c820f930bd1e94d9eebee0f5b55
parente intl - fix string buffer length size (diff)
downloadenlightenment-1db14b547a16f0435acc788b2cca9e7fdc43018c.tar.gz
e intel - fix number 2
so the crazieness in e+intl was because of eina_str_tolower() silliness... so work with it and another patch to follow on from 01e53356f8dce887254f1deeabc825a5c597fd7a ... @fix
-rw-r--r--src/bin/e_intl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/e_intl.c b/src/bin/e_intl.c
index d8c7ec848..a4f3de82d 100644
--- a/src/bin/e_intl.c
+++ b/src/bin/e_intl.c
@@ -536,7 +536,8 @@ _e_intl_locale_alias_get(const char *language)
{
Eina_Hash *alias_hash;
char *alias;
- char lower_language[256];
+ char lbuf[256];
+ char *lower_language = lbuf;
if ((!language) || (!strncmp(language, "POSIX", strlen("POSIX"))))
return strdup("C");
@@ -545,8 +546,8 @@ _e_intl_locale_alias_get(const char *language)
if (!alias_hash) /* No alias file available */
return strdup(language);
- strncpy(lower_language, language, sizeof(lower_language) - 1);
- lower_language[sizeof(lower_language) - 1] = '\0';
+ strncpy(lbuf, language, sizeof(lbuf) - 1);
+ lbuf[sizeof(lbuf) - 1] = '\0';
eina_str_tolower(&lower_language);
alias = eina_hash_find(alias_hash, lower_language);