diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-01-16 12:28:11 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-01-16 12:28:11 +0000 |
commit | 5bda4edb1a0d42c4ab3072d3c83526dadd6c0124 (patch) | |
tree | ce8af937d02e92610b91c2de094c800935333eae /riscos/font.c | |
parent | d899ebb5fa8c2692ddd1de9c91dce7863e0089f1 (diff) | |
download | netsurf-5bda4edb1a0d42c4ab3072d3c83526dadd6c0124.tar.gz netsurf-5bda4edb1a0d42c4ab3072d3c83526dadd6c0124.tar.bz2 |
Don't search back for spaces if the whole string fits in available width.
Diffstat (limited to 'riscos/font.c')
-rw-r--r-- | riscos/font.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/riscos/font.c b/riscos/font.c index 717b9606c..d92d5b521 100644 --- a/riscos/font.c +++ b/riscos/font.c @@ -358,8 +358,9 @@ bool nsfont_split(const plot_font_style_t *fstyle, return false; } - while (*char_offset && string[*char_offset] != ' ') - (*char_offset)--; + if (*char_offset != length) + while (*char_offset && string[*char_offset] != ' ') + (*char_offset)--; code = rufl_width(font_family, font_style, font_size, string, *char_offset, |