Weird gcc behavior
#1
I'm trying to figure out what's wrong in FS #265 (unable to place torches in linux debud builds)
http://www.mc-server.org/support/index.p...&project=2

The same problem happens in my virtualboxed ubuntu; I've traced it to be the blockchecking code. However, it's plain weird. I've added some logging and this is what I get. From code (BlockHandler.cpp, cBlockHandler::Check() ):
Code:
bool CanBe = CanBeAt(a_World, a_BlockX, a_BlockY, a_BlockZ);
LOGD("CanBe: %d", CanBe);
if (!CanBe)
{
    if (DoesDropOnUnsuitable())
    {
        LOGD("Dropping block at {%d, %d, %d} because it is in an unsuitable place", a_BlockX, a_BlockY, a_BlockZ);
I get the following output:
Code:
[b2179b70|14:25:53] CanBe: 255
[b2179b70|14:25:53] Dropping block at {-9, 66, 7} because it is in an unsuitable place

WTF? if CanBe is 255, then how come the code's taking the if() path???
Reply
Thanks given by:


Messages In This Thread
Weird gcc behavior - by xoft - 11-18-2012, 11:35 PM
RE: Weird gcc behavior - by ThuGie - 11-19-2012, 01:15 AM
RE: Weird gcc behavior - by FakeTruth - 11-19-2012, 03:10 AM
RE: Weird gcc behavior - by xoft - 11-19-2012, 03:50 AM
RE: Weird gcc behavior - by xoft - 11-19-2012, 07:43 AM
RE: Weird gcc behavior - by FakeTruth - 11-19-2012, 07:57 AM
RE: Weird gcc behavior - by xoft - 11-19-2012, 04:19 PM
RE: Weird gcc behavior - by FakeTruth - 11-19-2012, 05:56 PM



Users browsing this thread: 3 Guest(s)