From: divverent Date: Fri, 6 Aug 2010 17:57:09 +0000 (+0000) Subject: make sure the return value of R_PicmipForFlags can't get negative X-Git-Tag: xonotic-v0.1.0preview~298 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=04361b58a27b3e41d79b656677c680ea2cd3c25f;p=xonotic%2Fdarkplaces.git 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 ::stable-branch::merge=4ac44fe8bfceff11a0ff0bd8ccb8d095ad9c873b --- diff --git a/gl_textures.c b/gl_textures.c index f7245a98..cbf5da9f 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -1584,5 +1584,5 @@ int R_PicmipForFlags(int flags) else miplevel += gl_picmip_other.integer; } - return miplevel; + return max(0, miplevel); }