Skip to content

Commit

Permalink
quick UB fix for 3c0bdd7
Browse files Browse the repository at this point in the history
  • Loading branch information
shuffle2 authored Jun 6, 2017
1 parent c0495d1 commit 096399d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Core/Core/PowerPC/Interpreter/Interpreter_Integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void Interpreter::srawx(UGeckoInstruction inst)
s32 rrs = rGPR[inst.RS];
rGPR[inst.RA] = rrs >> amount;

SetCarry(rrs < 0 && (u32(rrs) << (32 - amount)) != 0);
SetCarry(rrs < 0 && amount > 0 && (u32(rrs) << (32 - amount)) != 0);
}

if (inst.Rc)
Expand All @@ -373,7 +373,7 @@ void Interpreter::srawix(UGeckoInstruction inst)
s32 rrs = rGPR[inst.RS];
rGPR[inst.RA] = rrs >> amount;

SetCarry(rrs < 0 && (u32(rrs) << (32 - amount)) != 0);
SetCarry(rrs < 0 && amount > 0 && (u32(rrs) << (32 - amount)) != 0);

if (inst.Rc)
Helper_UpdateCR0(rGPR[inst.RA]);
Expand Down

0 comments on commit 096399d

Please sign in to comment.