Skip to content

Commit

Permalink
Fix regression causing missing whitespace (Issue #533)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Nov 27, 2024
1 parent 57f8c5a commit 38f89c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Changes in HTMLDOC v1.9.20

- Fixed a regression that caused spaces to disappear between some words
(Issue #533)


# Changes in HTMLDOC v1.9.19

- Security: Fixed an issue with the `file_basename` implementation (Issue #532)
Expand Down
10 changes: 3 additions & 7 deletions htmldoc/ps-pdf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4811,8 +4811,7 @@ parse_paragraph(tree_t *t, /* I - Tree to parse */
*border;
float rgb[3];
uchar line[10240],
*lineptr,
*dataptr;
*lineptr;
tree_t *linetype;
float linex,
linewidth;
Expand Down Expand Up @@ -5204,12 +5203,9 @@ parse_paragraph(tree_t *t, /* I - Tree to parse */
if (temp != NULL && temp->markup == MARKUP_NONE && temp->data[0] == ' ' && temp->data[1])
{
// Drop leading space...
for (dataptr = temp->data; *dataptr; dataptr ++)
*dataptr = dataptr[1];
*dataptr = '\0';
temp->data ++;

temp_width = _htmlWidths[temp->typeface][temp->style][' '] * _htmlSizes[temp->size] * 0.001f;
temp->width -= temp_width;
temp->width -= _htmlWidths[temp->typeface][temp->style][' '] * _htmlSizes[temp->size] * 0.001f;
num_chars --;
}

Expand Down

0 comments on commit 38f89c2

Please sign in to comment.