From 5bda4edb1a0d42c4ab3072d3c83526dadd6c0124 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 16 Jan 2013 12:28:11 +0000 Subject: Don't search back for spaces if the whole string fits in available width. --- riscos/font.c | 5 +++-- 1 file 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, -- cgit v1.2.3