Advance src with next_line.

This fixes the double counting of the \n at the end of the chunk separator
line.
This commit is contained in:
Bill Currie 2013-02-26 19:51:26 +09:00
parent d1848a93c8
commit 3b56f0e3bf

View file

@ -157,7 +157,8 @@ Segtext_new (const char *source_string)
*src++ = 0; // terminate the previous chunk
*chunk = new_chunk ();
(*chunk)->tag = find_tag (src);
(*chunk)->text = next_line (src, &line);
src = next_line (src, &line);
(*chunk)->text = src;
(*chunk)->start_line = line;
// If tags are duplicated, the first one takes precedence
if ((*chunk)->tag && !Hash_Find (text->tab, (*chunk)->tag))