From ccc27577cb2a1881f219be6c7db9f9ad62429f74 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 30 Jun 2012 13:02:43 -0300 Subject: [PATCH] tools/libtxt/edit.c (text2edit): properly finish parsing (it always failed) --- tools/libtxt/edit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/libtxt/edit.c b/tools/libtxt/edit.c index 6aeb3a4..543b457 100644 --- a/tools/libtxt/edit.c +++ b/tools/libtxt/edit.c @@ -236,6 +236,9 @@ struct edit *text2edit(const char *s) s = end; start = s+1; } + if (s != start) + add_string(&last, start, s-start); + return e; fail: free_edit(e);