[fixed]CAttributeImpl.h: Small typo in getTriangle()

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Swarmer
Posts: 100
Joined: Mon Apr 16, 2007 7:23 am

[fixed]CAttributeImpl.h: Small typo in getTriangle()

Post by Swarmer »

In the getTriangle method in CAttribute.Impl.h, pointC.X appears twice, when the second time it should be pointC.Y. This bug happens twice.

Code: Select all

	virtual core::triangle3df getTriangle()
	{
		core::triangle3df ret;

		if (IsFloat)
		{
			ret.pointA.X = Count > 0 ? ValueF[0] : 0.0f;
			ret.pointA.Y = Count > 1 ? ValueF[1] : 0.0f;
			ret.pointA.Z = Count > 2 ? ValueF[2] : 0.0f;
			ret.pointB.X = Count > 3 ? ValueF[3] : 0.0f;
			ret.pointB.Y = Count > 4 ? ValueF[4] : 0.0f;
			ret.pointB.Z = Count > 5 ? ValueF[5] : 0.0f;
			ret.pointC.X = Count > 6 ? ValueF[6] : 0.0f;
			ret.pointC.X = Count > 7 ? ValueF[7] : 0.0f; // This should be ret.pointC.Y
			ret.pointC.Z = Count > 8 ? ValueF[8] : 0.0f;
		}
		else
		{
			ret.pointA.X = Count > 0 ? (f32)ValueI[0] : 0.0f;
			ret.pointA.Y = Count > 1 ? (f32)ValueI[1] : 0.0f;
			ret.pointA.Z = Count > 2 ? (f32)ValueI[2] : 0.0f;
			ret.pointB.X = Count > 3 ? (f32)ValueI[3] : 0.0f;
			ret.pointB.Y = Count > 4 ? (f32)ValueI[4] : 0.0f;
			ret.pointB.Z = Count > 5 ? (f32)ValueI[5] : 0.0f;
			ret.pointC.X = Count > 6 ? (f32)ValueI[6] : 0.0f;
			ret.pointC.X = Count > 7 ? (f32)ValueI[7] : 0.0f; // The same applies here
			ret.pointC.Z = Count > 8 ? (f32)ValueI[8] : 0.0f;
		}

		return ret;
	}
Just a little typo I guess. This is my first bug report; am I supposed to submit a patch or anything? I'm not sure how to do that. Can someone do it or tell me how? Thanks.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Hey, thanks, great spot. I'm sure that'll be fine. It's nice and clear.

Creating a patch is dependent on your Subversion client. If you're going to be developing the engine, you'll want to get yourself a Subversion client and do a SVN checkout from

https://irrlicht.svn.sourceforge.net/sv ... icht/trunk


With TortoiseSVN on Windows, creating a patch it's just:

Right click on the top level directory -> TortoiseSVN -> Create patch -> (uncheck any locally modified files with changes that you don't want to include in the patch) -> OK -> then either save to a file or click "Save to clipboard" and paste into a post here.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Swarmer
Posts: 100
Joined: Mon Apr 16, 2007 7:23 am

Post by Swarmer »

This bug is still in 1.4.2; I never added a patch for it. I'm having trouble getting everything set up. Can someone add a patch for this for me? Thanks.
Mirror
Posts: 218
Joined: Sat Dec 01, 2007 4:09 pm

Post by Mirror »

1781 doesn't have it fixed. i'm sure rogerborg will fix it soon
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, fixed for the 1.4 branch, merging it into trunk later on. Next time better add a bug ticket to the tracker at SourceForge, otherwise such reports are easily lost...
Post Reply