X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Ftext.c;h=0974481a785548081f20af77278c0e45ffc3fb03;hb=050269ccfc40b94a2255939df38831d2c75340d3;hp=c7d8499b42f12d25949562d0c2d0a13af2ceb347;hpb=72b5ebcb15f3d2c9a30733c4fafffd7b0e7a1d9c;p=rocksndiamonds.git diff --git a/src/libgame/text.c b/src/libgame/text.c index c7d8499b..0974481a 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -114,14 +114,16 @@ void getFontCharSource(int font_nr, char c, Bitmap **bitmap, int *x, int *y) /* text string helper functions */ /* ========================================================================= */ -int maxWordLengthInString(char *text) +int maxWordLengthInRequestString(char *text) { char *text_ptr; int word_len = 0, max_word_len = 0; for (text_ptr = text; *text_ptr; text_ptr++) { - word_len = (*text_ptr != ' ' ? word_len + 1 : 0); + word_len = (*text_ptr != ' ' && + *text_ptr != '?' && + *text_ptr != '!' ? word_len + 1 : 0); max_word_len = MAX(word_len, max_word_len); }