]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
this should work without strlen as well
authorblub <blub@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 23 Dec 2009 11:46:09 +0000 (11:46 +0000)
committerblub <blub@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 23 Dec 2009 11:46:09 +0000 (11:46 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9644 d7cf8633-e32d-0410-b094-e92efae38249

common.c

index dcec77eb391d824d905e52da00c72d09af94454c..c8ee1ca66f34e76b4fce41858aab3beee581c0a3 100644 (file)
--- 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)
                                {