summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-04-28 10:50:13 +0100
committerVincent Sanders <vince@kyllikki.org>2016-04-28 10:50:13 +0100
commitd6b6dafe50807138da5ad340157042318bc36615 (patch)
treeb0b946c4c0ce973c19768fe1376d22d81646c3fc /render
parente44bd09ac3a28823d9947c54949d115619003fe4 (diff)
downloadnetsurf-d6b6dafe50807138da5ad340157042318bc36615.tar.gz
netsurf-d6b6dafe50807138da5ad340157042318bc36615.tar.bz2
fix plain text render regression introduced in layout table changes
Diffstat (limited to 'render')
-rw-r--r--render/textplain.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/render/textplain.c b/render/textplain.c
index e999c352e..c825b7946 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -924,6 +924,7 @@ bool textplain_redraw(struct content *c, struct content_redraw_data *data,
size_t next_offset = offset;
int width;
int ntx;
+ nserror res;
while (next_offset < length && text_d[next_offset] != '\t')
next_offset = utf8_next(text_d, length, next_offset);
@@ -940,11 +941,12 @@ bool textplain_redraw(struct content *c, struct content_redraw_data *data,
if (next_offset >= length)
break;
- /* locate end of string and align to next tab position */
- if (guit->layout->width(&textplain_style,
+ res = guit->layout->width(&textplain_style,
&text_d[offset],
next_offset - offset,
- &width)) {
+ &width);
+ /* locate end of string and align to next tab position */
+ if (res == NSERROR_OK) {
tx += (int)(width * data->scale);
}