From e36bdb6f42a81bbecf4b599a6d6229fdaeab0008 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Quelin?= Date: Thu, 30 Oct 2008 18:33:20 +0100 Subject: [PATCH] fix handprint: should be a lone number instead of a 0gnirts --- lib/Language/Befunge/Interpreter.pm | 2 +- lib/Language/Befunge/Ops.pm | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Language/Befunge/Interpreter.pm b/lib/Language/Befunge/Interpreter.pm index 47eda18..d68a0f9 100644 --- a/lib/Language/Befunge/Interpreter.pm +++ b/lib/Language/Befunge/Interpreter.pm @@ -133,7 +133,7 @@ sub new { ops => $opts->{ops}->get_ops_map, ips => [], newips => [], - handprint => 'JQBF98', # the official handprint + handprint => 'JQBF', # the official handprint _wrapping => $wrapping, }; bless $self, $class; diff --git a/lib/Language/Befunge/Ops.pm b/lib/Language/Befunge/Ops.pm index a758fcd..dff2ca5 100644 --- a/lib/Language/Befunge/Ops.pm +++ b/lib/Language/Befunge/Ops.pm @@ -923,8 +923,9 @@ sub sys_info { push @cells, 4; # 3. implementation handprint. - my @hand = reverse map { ord } split //, $lbi->get_handprint . chr(0); - push @cells, \@hand; + my $handprint = 0; + $handprint = $handprint * 256 + ord($_) for split //, $lbi->get_handprint; + push @cells, $handprint; # 4. version number. my $ver = $Language::Befunge::VERSION; -- 2.11.4.GIT