]> 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)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 6 Aug 2010 17:52:52 +0000 (19:52 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10374 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=4ac44fe8bfceff11a0ff0bd8ccb8d095ad9c873b

gl_textures.c

index f7245a9892cbb859d09a79f8809378f4a5c1e27f..cbf5da9f2b35a38c5cfef88a15809dcb60239606 100644 (file)
@@ -1584,5 +1584,5 @@ int R_PicmipForFlags(int flags)
                else
                        miplevel += gl_picmip_other.integer;
        }
-       return miplevel;
+       return max(0, miplevel);
 }