forked from enlightenment/enventor
template: fix generate for names of templates.
Summary: without escaped char '\0' in the end of name, possible generate string with trash at the end. @fix Reviewers: Hermet Subscribers: NikaWhite Projects: #enventor Differential Revision: https://phab.enlightenment.org/D1303
This commit is contained in:
parent
f6fe9b7955
commit
848c337493
|
@ -14,11 +14,12 @@ static const char *
|
|||
template_part_first_line_get(void)
|
||||
{
|
||||
static char buf[40];
|
||||
char name[8];
|
||||
char name[9];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
name[i] = NAME_SEED[(rand() % NAME_SEED_LEN)];
|
||||
name[i]='\0';
|
||||
|
||||
snprintf(buf, sizeof(buf), "part { name: \"%s\";<br/>", name);
|
||||
|
||||
|
|
Loading…
Reference in New Issue