Navigation Menu

Skip to content

Commit

Permalink
add a header to M0 primitive strings, making most test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
cotto committed Jul 15, 2011
1 parent b5ae2ab commit 069285a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/m0/perl5/m0_interp.pl
Expand Up @@ -634,7 +634,8 @@ sub m0b_parse_const_seg {
my $byte_count = unpack("L", get_bytes($m0b, $cursor, 4));
while (scalar(@$consts < $const_count)) {
my $const_length = unpack("L", get_bytes($m0b, $cursor, 4));
my $const = unpack("a[$const_length]", get_bytes($m0b, $cursor, $const_length));
my $header = pack("LL", $const_length, 0);
my $const = $header . unpack("a[$const_length]", get_bytes($m0b, $cursor, $const_length));
m0_say "found constant of length $const_length: '$const'";
push @$consts, $const;
}
Expand Down

0 comments on commit 069285a

Please sign in to comment.