From 4ac44fe8bfceff11a0ff0bd8ccb8d095ad9c873b Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 6 Aug 2010 17:57:09 +0000 Subject: [PATCH] make sure the return value of R_PicmipForFlags can't get negative git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10374 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_textures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_textures.c b/gl_textures.c index 448a9cd9..e9b5d710 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -2206,5 +2206,5 @@ int R_PicmipForFlags(int flags) else miplevel += gl_picmip_other.integer; } - return miplevel; + return max(0, miplevel); } -- 2.39.2