** Fix for instruction at position 'pc' to jump to 'dest'. ** (Jump addresses are relative in Lua). 'back' true means ** a back jump. */
| 1528 | ** a back jump. |
| 1529 | */ |
| 1530 | static void fixforjump (FuncState *fs, int pc, int dest, int back) { |
| 1531 | Instruction *jmp = &fs->f->code[pc]; |
| 1532 | int offset = dest - (pc + 1); |
| 1533 | if (back) |
| 1534 | offset = -offset; |
| 1535 | if (l_unlikely(offset > MAXARG_Bx)) |
| 1536 | luaX_syntaxerror(fs->ls, "control structure too long"); |
| 1537 | SETARG_Bx(*jmp, offset); |
| 1538 | } |
| 1539 | |
| 1540 | |
| 1541 | /* |
no test coverage detected