1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2024-11-26 05:54:03 +02:00

tools/libtxt/edit.c (add_string): NULL-terminate the list of edits

This commit is contained in:
Werner Almesberger 2012-11-01 18:05:47 -03:00
parent af047755b9
commit 95c7d71fb2

View File

@ -195,6 +195,7 @@ static void add_string(struct edit ***last, const char *start, size_t len)
e = alloc_type(struct edit); e = alloc_type(struct edit);
e->type = edit_string; e->type = edit_string;
e->u.s = alloc_string_n(start, len); e->u.s = alloc_string_n(start, len);
e->next = NULL;
**last = e; **last = e;
*last = &e->next; *last = &e->next;
} }