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:
Benoît Minisini 2022-12-10 00:22:17 +01:00
parent e495a05249
commit 0acbd1979c

View file

@ -453,6 +453,8 @@ void TRANS_control_exit(void)
for(j = 1; j <= 4; j++) // avoid infinite loop
{
if (jump->dst >= JOB->func->ncode)
break;
pcode = &JOB->func->code[jump->dst];
if (!PCODE_is_jump(*pcode))
break;