From 47472df4cb31ceae88fd915970d14267331f0735 Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 5 Mar 2015 10:48:32 +0000 Subject: [PATCH] Fix a dpsnprintf use. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12194 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cl_screen.c b/cl_screen.c index 66c17e17..5bcce5f3 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -954,7 +954,8 @@ void R_TimeReport(const char *desc) t = (int) ((r_timereport_current - r_timereport_temp) * 1000000.0 + 0.5); length = dpsnprintf(tempbuf, sizeof(tempbuf), "%8i %s", t, desc); - length = min(length, (int)sizeof(tempbuf) - 1); + if (length < 0) + length = (int)sizeof(tempbuf) - 1; if (r_speeds_longestitem < length) r_speeds_longestitem = length; for (;length < r_speeds_longestitem;length++) -- 2.39.2