forked from enlightenment/efl
nul terminate string from ecore_x_randr_output_name_get
This commit is contained in:
parent
cff1a9a59f
commit
8cbd7c1622
|
@ -2206,8 +2206,9 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
|
||||||
{
|
{
|
||||||
if (info->name)
|
if (info->name)
|
||||||
{
|
{
|
||||||
ret = malloc(info->nameLen);
|
ret = malloc(info->nameLen + 1);
|
||||||
memcpy(ret, info->name, info->nameLen);
|
memcpy(ret, info->name, info->nameLen);
|
||||||
|
ret[info->nameLen] = 0;
|
||||||
if (len) *len = info->nameLen;
|
if (len) *len = info->nameLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue