From 6b1292df5635bf2dcefdb857cdd7bd3f2303d6af Mon Sep 17 00:00:00 2001 From: black Date: Tue, 30 Nov 2004 20:33:22 +0000 Subject: [PATCH] -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 --- cl_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.2