Skip to content

Commit

Permalink
operator precedence bugs: ! binds more tightly than &
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Doolittle authored and lynxlynxlynx committed Apr 4, 2016
1 parent 866c154 commit 857f21e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gemrb/plugins/GUIScript/GUIScript.cpp
Expand Up @@ -13620,7 +13620,7 @@ static PyObject* GemRB_SpellCast(PyObject * /*self*/, PyObject* args)
core->FreeString(tmp);
print("Target: %d", spelldata.Target);
print("Range: %d", spelldata.Range);
if(! (1<<spelldata.type) & type) {
if(!((1<<spelldata.type) & type)) {
return RuntimeError( "Wrong type of spell!");
}

Expand Down
2 changes: 1 addition & 1 deletion gemrb/plugins/OpenALAudio/AmbientMgrAL.cpp
Expand Up @@ -192,7 +192,7 @@ unsigned int AmbientMgrAL::AmbientSource::tick(unsigned int ticks, Point listene
return UINT_MAX;
}

if ((!(ambient->getFlags() & IE_AMBI_ENABLED)) || (!ambient->getAppearance() & timeslice)) {
if (!(ambient->getFlags() & IE_AMBI_ENABLED) || !(ambient->getAppearance() & timeslice)) {
// disabled

if (stream >= 0) {
Expand Down

0 comments on commit 857f21e

Please sign in to comment.