summaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-04-03 21:25:53 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2011-04-03 21:25:53 +0200
commitda2887c4a786ffdb97ce89fa257ef9818b53285c (patch)
tree9fc0ca2b80fb173293b0cb2780b9e933c8a462c3 /src/html.cc
parentebdaebc4a378185d3df4146eebed9aa5032a4d6b (diff)
flush the Textblock we last added to
In Html_write_raw() the current textblock can change while parsing HTML. Instead of flushing the Textblock we started with, we now flush the current one. This fixes a long standing drawing bug where text was not positioned initially.
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/html.cc b/src/html.cc
index 254ca04d..c5acfa4a 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3718,11 +3718,8 @@ static void Html_callback(int Op, CacheClient_t *Client)
static int Html_write_raw(DilloHtml *html, char *buf, int bufsize, int Eof)
{
char ch = 0, *p, *text;
- Textblock *textblock;
int token_start, buf_index;
- dReturn_val_if_fail ((textblock = HT2TB(html)) != NULL, 0);
-
/* Now, 'buf' and 'bufsize' define a buffer aligned to start at a token
* boundary. Iterate through tokens until end of buffer is reached. */
buf_index = 0;
@@ -3841,7 +3838,7 @@ static int Html_write_raw(DilloHtml *html, char *buf, int bufsize, int Eof)
}
}/*while*/
- textblock->flush ();
+ HT2TB(html)->flush ();
return token_start;
}