Permalink
Browse files

fx_disguise: fix avatar range checks

coverity 4346
  • Loading branch information...
1 parent 23a35b0 commit 3a0c76f90e465123698815bd29a3a9c8d359863a @lynxlynxlynx lynxlynxlynx committed Apr 18, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 gemrb/plugins/IWDOpcodes/IWDOpcodes.cpp
@@ -3270,12 +3270,12 @@ int fx_disguise (Scriptable* /*Owner*/, Actor* target, Effect* fx)
}
ieDword anim = BASE_GET(IE_ANIMATION_ID);
- if (anim>=0x6000 || anim<=0x6fff) {
+ if (anim>=0x6000 && anim<=0x6fff) {
STAT_SET(IE_ANIMATION_ID, anim&0x600f);
return FX_APPLIED;
}
- if (anim>=0x5000 || anim<=0x5fff) {
+ if (anim>=0x5000 && anim<=0x5fff) {
STAT_SET(IE_ANIMATION_ID, anim&0x500f);
return FX_APPLIED;
}

0 comments on commit 3a0c76f

Please sign in to comment.