Skip to content

Commit

Permalink
Fixing two cases of << used instead of >> (found by Coverity Scan).
Browse files Browse the repository at this point in the history
  • Loading branch information
marzojr committed Nov 24, 2016
1 parent 29da1f8 commit e98ec5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actorio.cc
Expand Up @@ -184,7 +184,7 @@ void Actor::read(
} else
set_skin_color(-1);

if ((strength_val << 7) & 1) set_flag(Obj_flags::freeze);
if ((strength_val >> 7) & 1) set_flag(Obj_flags::freeze);
}

if (is_dying() && // Now we know health, strength.
Expand All @@ -208,7 +208,7 @@ void Actor::read(
// Combat skill (0-6), Petra (7)
int combat_val = nfile->read1();
set_property(static_cast<int>(Actor::combat), combat_val & 0x7F);
if ((combat_val << 7) & 1) set_flag(Obj_flags::petra);
if ((combat_val >> 7) & 1) set_flag(Obj_flags::petra);

schedule_type = nfile->read1();
int amode = nfile->read1(); // Default attack mode
Expand Down

0 comments on commit e98ec5b

Please sign in to comment.