cvsuser     01/09/24 07:34:34

  Modified:    .        assemble.pl
  Log:
    * Fixed handling of constants starting with '0' that should not be
      sent through oct(). For example 'set N2 0.1' was being interpreted
      as 'set N2 0' (naughty).
  
      As reported by Leon Brocard <[EMAIL PROTECTED]> in the comments of
      his mandelbrot.pasm example.
  
  Revision  Changes    Path
  1.44      +3 -3      parrot/assemble.pl
  
  Index: assemble.pl
  ===================================================================
  RCS file: /home/perlcvs/parrot/assemble.pl,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -w -r1.43 -r1.44
  --- assemble.pl       2001/09/24 01:21:46     1.43
  +++ assemble.pl       2001/09/24 14:34:34     1.44
  @@ -27,7 +27,7 @@
   }
   
   if($options{'version'}) {
  -    print $0,'Version $Id: assemble.pl,v 1.43 2001/09/24 01:21:46 bdwheele Exp $ 
',"\n";
  +    print $0,'Version $Id: assemble.pl,v 1.44 2001/09/24 14:34:34 gregor Exp $ 
',"\n";
       exit;
   }
   
  @@ -82,7 +82,7 @@
   my ($file,$line,$pline,$sline);
   my %equate=('*'=>sub { return $pc },
            '__DATE__'=>'"'.scalar(localtime).'"',
  -         '__VERSION__'=>'" $Revision: 1.43 $ "',
  +         '__VERSION__'=>'" $Revision: 1.44 $ "',
            '__LINE__' => sub { return $line },
            '__FILE__' => sub { return "\"$file\"" });
   
  @@ -339,7 +339,7 @@
        } elsif($rtype eq 's') {
            $args[$_]=~s/[\[\]]//g;
        } else {
  -         $args[$_]=oct($args[$_]) if($args[$_]=~/^0/);
  +         $args[$_]=oct($args[$_]) if($args[$_]=~/^0[xb]?[0-9a-f]*$/);
        }
           $pc+=sizeof($rtype);
        $bytecode .= pack_arg($rtype, $args[$_]);
  
  
  

Reply via email to