]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
-Fixed a bug in drawstring - it used maxlen instead of len in a validity check
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 30 Nov 2004 20:33:22 +0000 (20:33 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 30 Nov 2004 20:33:22 +0000 (20:33 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4799 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index 9177d0e66b2ed9d3befd6b619c0ea0adeb1beb3a..f048179490aea2ddbbbe36ca9e3c703fb68b5842 100644 (file)
@@ -498,7 +498,7 @@ void DrawQ_String_Real(float x, float y, const char *string, int maxlen, float s
        for (;len > 0 && string[len - 1] == ' ';len--);
        if (len < 1)
                return;
-       if (x >= vid.conwidth || y >= vid.conheight || x < (-scalex * maxlen) || y < (-scaley))
+       if (x >= vid.conwidth || y >= vid.conheight || x < (-scalex * len) || y < (-scaley))
                return;
        size = sizeof(*dq) + ((len + 1 + 3) & ~3);
        if (r_refdef.drawqueuesize + size > r_refdef.maxdrawqueuesize)