X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=a3aa3c34a9cbe12bf06beeb3c58395e6ae420019;hb=a42320dc0f3af61bee63a8d81508e6ff5b44c41b;hp=e56516a016ef5cd04e40b08d3a55ae966e9fc968;hpb=3d239257edb32ac9e5fa7a2dd515e91f45578fde;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index e56516a0..a3aa3c34 100644 --- a/src/tools.c +++ b/src/tools.c @@ -3176,6 +3176,13 @@ static void DrawEnvelopeRequestText(int sx, int sy, char *text) { char *src_text_ptr, *dst_text_ptr; + if (maxWordLengthInRequestString(text) > line_length) + { + font_nr = FONT_REQUEST_NARROW; + font_width = getFontWidth(font_nr); + line_length = max_text_width / font_width; + } + text_door_style = checked_malloc(2 * strlen(text) + 1); src_text_ptr = text;