[fixed]Chasing a bug in os.cpp

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
Jesus.Net
Posts: 31
Joined: Sat Apr 15, 2006 6:14 pm
Contact:

[fixed]Chasing a bug in os.cpp

Post by Jesus.Net »

Hello,

While developing a code based on Irrlicht 1.5, I found something that could be a bug. I'm not sure, I can be wrong, it's your decision.

The allegedly erroneous code is located at the source "os.cpp".
This is the last "#else" it defines "bswap_16(X)."

It shows something like the following:
#define bswap_16 (X) ((((X) & 0xFF) <<8) | (((X) & = 0xFF00)>> 8))

Inside there is a symbol made equal (=) in the second member, after the symbol |, next to the symbol &.

Is this a sign of more? Have you cast this bug? I get the impression that it is, since bswap_32 (X) is not included.

I hope I have helped somewhat.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Re: Chasing a bug in os.cpp

Post by vitek »

Jesus.Net wrote:

Code: Select all

#define bswap_16 (X) ((((X) & 0xFF) <<8) | (((X) & = 0xFF00)>> 8))
Sure looks like a bug to me. That said, I wish stuff like this was written as an inline function intead of a macro...

Travis
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yeah, thanks. Fixed now.
Jesus.Net
Posts: 31
Joined: Sat Apr 15, 2006 6:14 pm
Contact:

Re: Chasing a bug in os.cpp

Post by Jesus.Net »

vitek wrote:
Jesus.Net wrote:

Code: Select all

#define bswap_16 (X) ((((X) & 0xFF) <<8) | (((X) & = 0xFF00)>> 8))
Sure looks like a bug to me. That said, I wish stuff like this was written as an inline function intead of a macro...

Travis
Not a bad idea, vitek, i never understood why this is here.
Post Reply