From: black Date: Tue, 30 Nov 2004 20:33:22 +0000 (+0000) Subject: -Fixed a bug in drawstring - it used maxlen instead of len in a validity check X-Git-Tag: xonotic-v0.1.0preview~5337 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6b1292df5635bf2dcefdb857cdd7bd3f2303d6af;p=xonotic%2Fdarkplaces.git -Fixed a bug in drawstring - it used maxlen instead of len in a validity check git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4799 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_screen.c b/cl_screen.c index 9177d0e6..f0481794 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -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)