forked from enlightenment/enlightenment
Bugfix: e xkbswitch: Fix parsing when there is no space in group name.
This commit is contained in:
parent
7bfeef352c
commit
2026958af0
|
@ -211,7 +211,7 @@ parse_rules(void)
|
||||||
{
|
{
|
||||||
if (fgets(buf, sizeof(buf), f))
|
if (fgets(buf, sizeof(buf), f))
|
||||||
{
|
{
|
||||||
char *n, *p, *tmp, *name, *txt;
|
char *n, *p, *t, *tmp, *name, *txt;
|
||||||
|
|
||||||
n = strchr(buf, '\n');
|
n = strchr(buf, '\n');
|
||||||
if (n) *n = '\0';
|
if (n) *n = '\0';
|
||||||
|
@ -236,11 +236,12 @@ parse_rules(void)
|
||||||
/* A hack to get it to parse right if
|
/* A hack to get it to parse right if
|
||||||
* the group name contains a space
|
* the group name contains a space
|
||||||
*/
|
*/
|
||||||
p = strstr(p, " ");
|
t = strstr(p, " ");
|
||||||
if (p)
|
if (t)
|
||||||
{
|
{
|
||||||
while (p[0] == ' ')
|
while (t[0] == ' ')
|
||||||
++p;
|
++t;
|
||||||
|
p = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
txt = evas_textblock_text_markup_to_utf8(NULL, p);
|
txt = evas_textblock_text_markup_to_utf8(NULL, p);
|
||||||
|
|
Loading…
Reference in New Issue