mirror of
https://github.com/simh/simh.git
synced 2026-05-04 15:05:39 +00:00
Fixes to infinite loop issues found by Mikulas Patocka
This commit is contained in:
@@ -1750,7 +1750,7 @@ static void trace_instruction (void)
|
||||
fac *= (float) (1 << 30);
|
||||
exp -= 30;
|
||||
while (exp > 0)
|
||||
fac *= 2;
|
||||
fac *= 2, exp--;
|
||||
}
|
||||
else if (exp > 0)
|
||||
fac *= (float) (1 << exp);
|
||||
@@ -1758,7 +1758,7 @@ static void trace_instruction (void)
|
||||
fac /= (float) (1 << 30);
|
||||
exp += 30;
|
||||
while (exp < 0)
|
||||
fac /= 2;
|
||||
fac /= 2, exp++;
|
||||
}
|
||||
else if (exp < 0)
|
||||
fac /= (float) (1 << -exp);
|
||||
|
||||
Reference in New Issue
Block a user