Ignore jumps to the end of the function when optimizing jumps.
[COMPILER] * BUG: Ignore jumps to the end of the function when optimizing jumps.
This commit is contained in:
parent
e495a05249
commit
0acbd1979c
1 changed files with 2 additions and 0 deletions
|
@ -453,6 +453,8 @@ void TRANS_control_exit(void)
|
||||||
|
|
||||||
for(j = 1; j <= 4; j++) // avoid infinite loop
|
for(j = 1; j <= 4; j++) // avoid infinite loop
|
||||||
{
|
{
|
||||||
|
if (jump->dst >= JOB->func->ncode)
|
||||||
|
break;
|
||||||
pcode = &JOB->func->code[jump->dst];
|
pcode = &JOB->func->code[jump->dst];
|
||||||
if (!PCODE_is_jump(*pcode))
|
if (!PCODE_is_jump(*pcode))
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue