From 525b7a84247360d69b486b81cb5d575c0dd938e7 Mon Sep 17 00:00:00 2001 From: blub Date: Wed, 23 Dec 2009 11:46:09 +0000 Subject: [PATCH] this should work without strlen as well git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9644 d7cf8633-e32d-0410-b094-e92efae38249 --- common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common.c b/common.c index dcec77eb..c8ee1ca6 100644 --- a/common.c +++ b/common.c @@ -740,9 +740,11 @@ int COM_Wordwrap(const char *string, size_t length, float continuationWidth, flo } } out_inner: + /* wordChars = strlen(cursor); if (wordChars > wordLen) - wordChars = wordLen; + */ + wordChars = wordLen; spaceUsedForWord = wordWidth(passthroughCW, cursor, &wordChars, maxWidth - continuationWidth); // this may have reduced wordLen when it won't fit - but this is GOOD. TODO fix words that do fit in a non-continuation line if(wordChars < 1) { -- 2.39.2