** Fix for instruction at position 'pc' to jump to 'dest'. ** (Jump addresses are relative in Lua). 'back' true means ** a back jump. */
| 1643 | ** a back jump. |
| 1644 | */ |
| 1645 | static void fixforjump (FuncState *fs, int pc, int dest, int back) { |
| 1646 | Instruction *jmp = &fs->f->code[pc]; |
| 1647 | int offset = dest - (pc + 1); |
| 1648 | if (back) |
| 1649 | offset = -offset; |
| 1650 | if (l_unlikely(offset > MAXARG_Bx)) |
| 1651 | luaX_syntaxerror(fs->ls, "control structure too long"); |
| 1652 | SETARG_Bx(*jmp, offset); |
| 1653 | } |
| 1654 | |
| 1655 | |
| 1656 | /* |
no test coverage detected