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~230^2~104 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4ac44fe8bfceff11a0ff0bd8ccb8d095ad9c873b;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 --- 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); }