1
0
Fork 0

[dump] Check for end of link at the end of loop, not at the begining (off by one). Refs #198

This commit is contained in:
Witold Filipczyk 2022-11-28 08:32:02 +01:00
parent 8e619e4d02
commit 023991e5c5
1 changed files with 5 additions and 3 deletions

View File

@ -70,9 +70,6 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, struct dump_output *out)
if (is_start_of_link(document, x, y, &current_link_number, &next_link)) {
write_start_of_link(next_link, out);
}
if (is_end_of_link(document, x, y, &current_link_number, &next_link)) {
write_end_of_link(out);
}
}
#ifdef DUMP_CHARSET_UTF8
unicode_val_T c;
@ -180,6 +177,11 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, struct dump_output *out)
if (write_char(c, out))
return -1;
#endif /* !DUMP_CHARSET_UTF8 */
if (dumplinks) {
if (is_end_of_link(document, x, y, &current_link_number, &next_link)) {
write_end_of_link(out);
}
}
}
#ifndef DUMP_COLOR_MODE_NONE