mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Fix potential shift by negative number.
This commit is contained in:
parent
10626e356d
commit
3cb474047b
@ -572,7 +572,7 @@ namespace MIPSInt
|
||||
{ //TODO: verify
|
||||
int x = 31;
|
||||
int count=0;
|
||||
while (!(R(rs) & (1<<x)) && x >= 0)
|
||||
while (x >= 0 && !(R(rs) & (1<<x)))
|
||||
{
|
||||
count++;
|
||||
x--;
|
||||
@ -584,7 +584,7 @@ namespace MIPSInt
|
||||
{ //TODO: verify
|
||||
int x = 31;
|
||||
int count=0;
|
||||
while ((R(rs) & (1<<x)) && x >= 0)
|
||||
while (x >= 0 && (R(rs) & (1<<x)))
|
||||
{
|
||||
count++;
|
||||
x--;
|
||||
|
Loading…
Reference in New Issue
Block a user