summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-02-19 15:49:48 +0000
committerManolo Gouy <Manolo>2017-02-19 15:49:48 +0000
commita2f22358cd11047fda8bb6f8af382776e099cd5e (patch)
tree1e9eb0d1f3e0b0dcb0b5b321387b9aa6af1f0ea9 /src
parent3ce40f3fafe6699eff086fde41ba11ce018217db (diff)
Fix line wrap at word end when string widths are true double values (non integer).
Useful for rescaling that creates non-integer string widths. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_draw.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx
index d6e184002..137dfaf8d 100644
--- a/src/fl_draw.cxx
+++ b/src/fl_draw.cxx
@@ -64,7 +64,7 @@ static const char* expand_text_(const char* from, char*& buf, int maxbuf, double
// test for word-wrap:
if (word_start < p && wrap) {
double newwidth = w + fl_width(word_end, (int) (o-word_end) );
- if (word_end > buf && newwidth > maxw) { // break before this word
+ if (word_end > buf && int(newwidth) > maxw) { // break before this word
o = word_end;
p = word_start;
break;