From b4f2a2ebc2e956ddca3396c9a86b4e3ac64dbb0d Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 23 Jan 2011 17:08:47 +0000 Subject: [PATCH] fix log(2) compile error as C++, should have been log(2.0f) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10733 d7cf8633-e32d-0410-b094-e92efae38249 --- dpsoftrast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpsoftrast.c b/dpsoftrast.c index 014dc60d..602bf113 100644 --- a/dpsoftrast.c +++ b/dpsoftrast.c @@ -2364,7 +2364,7 @@ void DPSOFTRAST_Draw_ProcessTriangles(int firstvertex, int numvertices, int numt mip_edge1mip = (mip_edge1tc[0]*mip_edge1tc[0]+mip_edge1tc[1]*mip_edge1tc[1]) * mip_edge1xymul; // this will be multiplied in the texturing routine by the texture resolution mipdensity = mip_edge0mip < mip_edge1mip ? mip_edge0mip : mip_edge1mip; - y = (int)(log(mipdensity)/log(2) + 0.5f); + y = (int)(log(mipdensity)/log(2.0f) + 0.5f); if (y < 0) y = 0; if (y > texture->mipmaps - 1) -- 2.39.2