don't assume 0x is at start of string
authorDr. Stephen Henson <steve@openssl.org>
Wed, 3 Feb 2010 18:19:22 +0000 (18:19 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 3 Feb 2010 18:19:22 +0000 (18:19 +0000)
crypto/perlasm/x86_64-xlate.pl

index e4fc17bdbdbc8976da1b82aa99a833090e2e2f96..d89765d7ee22a3a5ef3268cdd86a287e0863e910 100755 (executable)
@@ -578,7 +578,7 @@ my %globals;
                                    my $last = pop(@arr);
                                    my $conv = sub  {   my $var=shift;
                                                        $var=~s/^(0b[0-1]+)/oct($1)/eig;
                                    my $last = pop(@arr);
                                    my $conv = sub  {   my $var=shift;
                                                        $var=~s/^(0b[0-1]+)/oct($1)/eig;
-                                                       $var=~s/^0x([0-9a-f]+)/0$1h/ig if ($masm);
+                                                       $var=~s/0x([0-9a-f]+)/0$1h/ig if ($masm);
                                                        if ($sz eq "D" && ($current_segment=~/.[px]data/ || $dir eq ".rva"))
                                                        { $var=~s/([_a-z\$\@][_a-z0-9\$\@]*)/$nasm?"$1 wrt ..imagebase":"imagerel $1"/egi; }
                                                        $var;
                                                        if ($sz eq "D" && ($current_segment=~/.[px]data/ || $dir eq ".rva"))
                                                        { $var=~s/([_a-z\$\@][_a-z0-9\$\@]*)/$nasm?"$1 wrt ..imagebase":"imagerel $1"/egi; }
                                                        $var;