From 0ec2c2a26c3c7f3e6ba900d0b6838b9f726fc756 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Fri, 11 Mar 2011 07:59:38 +0000 Subject: [PATCH] --- reaction/code/cgame/cg_drawtools.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reaction/code/cgame/cg_drawtools.c b/reaction/code/cgame/cg_drawtools.c index 2d861677..ba50b192 100644 --- a/reaction/code/cgame/cg_drawtools.c +++ b/reaction/code/cgame/cg_drawtools.c @@ -142,6 +142,10 @@ void CG_DrawFuzzyRect(float x, float y, float w, float h, float corner, vec4_t c float ycorner = corner * cgs.screenYScale; CG_AdjustFrom640(&x, &y, &w, &h); + if (xcorner + xcorner > w) + xcorner = w * 0.5f; + if (ycorner + ycorner > h) + ycorner = h * 0.5f; trap_R_SetColor(color); @@ -382,6 +386,9 @@ int CG_DrawStrlen(const char *str) int count = 0; int max = 0; + if (!str) + return 0; + while (*s) { if (Q_IsColorString(s)) { s += 2;