Skip to content

Commit

Permalink
fix goto_chunk, now down to one failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
cotto committed Jul 23, 2011
1 parent 7927698 commit 26e37dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/m0/perl5/m0_interp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ sub m0_opfunc_goto_chunk {
my ($cf, $a1, $a2, $a3) = @_;

my $new_pc = unpack('l', $$cf->[$a1]);
my $chunk_name = unpack('a', bytes::substr($$cf->[$a2], 2));
my $name_len = unpack('l', bytes::substr($$cf->[$a2], 0, 4));
my $encoding = unpack('l', bytes::substr($$cf->[$a2], 4, 4));
my $chunk_name = unpack("a[$name_len]", bytes::substr($$cf->[$a2], 8));
chop($chunk_name); #remove trailing null
my $interp = $$cf->[INTERP];

m0_say "goto_chunk $a1, $a2, $a3 (chunk = '$chunk_name')";
Expand Down

0 comments on commit 26e37dd

Please sign in to comment.