PDA
$threadinfo[title]
-


RedDwarf
May 15th, 2008, 17:09
When packaging Mupen64Plus for openSUSE I found this in the Mupen64 package.
--- RenderExt.cpp
+++ RenderExt.cpp 2007/11/15 14:22:48
@@ -405,7 +405,7 @@
}

//RECT src = {left,top,width, height};
- float depth = ( gRDP.otherMode.depth_source == 1 ) ? depth = gRDP.fPrimitiveDepth : 0;
+ float depth = ( gRDP.otherMode.depth_source == 1 ) ? gRDP.fPrimitiveDepth : 0;

float x0 = sprite.sprite.objX/4.0f;
float y0 = sprite.sprite.objY/4.0f;
--- TextureFilters.cpp
+++ TextureFilters.cpp 2007/11/15 14:24:26
@@ -1858,7 +1858,8 @@
}
else if( entry.ti.Format == TXT_FMT_I )
{
- *pdst++ = *(pdst-1);
+ *pdst = *(pdst-1);
+ pdst++;
}
else
{
They still apply to Mupen64Plus 1.3. The first one is pretty stupid, but... And the seconds one, I _suppose_ the "++" from "*pdst++" applies to *pdst and not to pdst, and so there is a real bug?

Richard42
May 15th, 2008, 21:30
Thanks for the info. I'm pretty sure that I fixed the second one recently because it threw a warning when we added -Wall to the makefile. I'll take a look at the first.

nmn
May 15th, 2008, 23:26
I believe the actual affect of such code is undefined but GCC handles it correctly.

Slougi
May 16th, 2008, 14:10
Without further context, the first change looks correct as well.

Richard42
May 16th, 2008, 16:53
Without further context, the first change looks correct as well.

I looked at the code for the first change at the head of SVN, and someone had already modified it. But the new code was also doing some "clever" things, so I simplified it and committed it.