]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
make sure the return value of R_PicmipForFlags can't get negative
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Aug 2010 17:57:09 +0000 (17:57 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Aug 2010 17:57:09 +0000 (17:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10374 d7cf8633-e32d-0410-b094-e92efae38249

gl_textures.c

index 448a9cd97bb4c74686d3ae5c9a13acbe60059565..e9b5d7101bc58961d6ce81f55fcfa7b134efb9e7 100644 (file)
@@ -2206,5 +2206,5 @@ int R_PicmipForFlags(int flags)
                else
                        miplevel += gl_picmip_other.integer;
        }
-       return miplevel;
+       return max(0, miplevel);
 }