]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix a dpsnprintf use.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 10:48:32 +0000 (10:48 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 10:48:32 +0000 (10:48 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12194 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index 66c17e170636bca59e87e7e3aa27aca104d497cf..5bcce5f35ad79e00d8be0e336744d52216e5840c 100644 (file)
@@ -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++)