From 6f55f53e1f48dc1a5037f6295d3a6b2ee4d4a06b Mon Sep 17 00:00:00 2001 From: Arthur Darcet Date: Tue, 30 Aug 2016 15:23:32 +0200 Subject: [PATCH] Fix text wrapping bug If the last letter of the last word is the only thing overflowing, but there is a wrap point somewhere available, then it should be used to wrap --- MagickCore/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c index 297304f60..b98397417 100644 --- a/MagickCore/annotate.c +++ b/MagickCore/annotate.c @@ -634,7 +634,7 @@ MagickExport ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info, if (status == MagickFalse) break; width=(size_t) floor(metrics->width+draw_info->stroke_width+0.5); - if ((width <= image->columns) || (strcmp(text,draw_info->text) == 0)) + if ((width <= image->columns) || (s == (char *) NULL)) continue; (void) strcpy(text,draw_info->text); if ((s != (char *) NULL) && (GetUTFOctets(s) == 1)) -- 2.50.1