Fixed crash when using --check-debug and a check structure kind=toggle.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5313 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e2380c9ee3
commit
7c91eb7f34
@ -131,10 +131,15 @@ void CheckStructure::trigger(unsigned int kart_index)
|
||||
cs->m_is_active[kart_index] = !cs->m_is_active[kart_index];
|
||||
if(UserConfigParams::m_check_debug)
|
||||
{
|
||||
// At least on gcc 4.3.2 we can't simply print
|
||||
// cs->m_is_active[kart_index] ("cannot pass objects of
|
||||
// non-POD type ‘struct std::_Bit_reference’ through ‘...’;
|
||||
// call will abort at runtime"). So we use this somewhat
|
||||
// unusual but portable construct.
|
||||
printf("CHECK: %s %d triggered, setting %d to %d.\n",
|
||||
World::getWorld()->getKart(kart_index)->getIdent().c_str(),
|
||||
m_index, m_activate_check_index,
|
||||
cs->m_is_active[kart_index]);
|
||||
cs->m_is_active[kart_index]==true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user