Guest User

Untitled

a guest
Jan 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. diff --git a/src/sub.c b/src/sub.c
  2. index 84a384a..d84518d 100644
  3. --- a/src/sub.c
  4. +++ b/src/sub.c
  5. @@ -221,7 +221,7 @@ Parrot_sub_get_line_from_pc(PARROT_INTERP, ARGIN_NULLOK(PMC *subpmc), ARGIN_NULL
  6. ASSERT_ARGS(Parrot_sub_get_line_from_pc)
  7. Parrot_Sub_attributes *sub;
  8. opcode_t *base_pc, *debug_ops;
  9. - size_t i, op, current_annotation, debug_size;
  10. + size_t i, op, current_annotation, debug_size, code_size;
  11.  
  12. if (!subpmc || !pc)
  13. return -1;
  14. @@ -230,13 +230,14 @@ Parrot_sub_get_line_from_pc(PARROT_INTERP, ARGIN_NULLOK(PMC *subpmc), ARGIN_NULL
  15.  
  16. debug_ops = sub->seg->debugs->base.data;
  17. debug_size = sub->seg->debugs->base.size;
  18. + code_size = sub->seg->base.size;
  19. base_pc = sub->seg->base.data;
  20. current_annotation = pc - base_pc;
  21.  
  22. /* assert pc is in correct segment */
  23. - PARROT_ASSERT(base_pc <= pc && pc <= base_pc + sub->seg->base.size);
  24. + PARROT_ASSERT(base_pc <= pc && pc <= base_pc + code_size);
  25.  
  26. - for (i = op = 0; op < debug_size; ++i) {
  27. + for (i = op = 0; op < code_size; ++i) {
  28. op_info_t * const op_info = sub->seg->op_info_table[*base_pc];
  29. opcode_t var_args = 0;
Add Comment
Please, Sign In to add comment