This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
STDCHAR * might not be char *.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 28 Nov 2017 05:44:10 +0000 (07:44 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 28 Nov 2017 05:58:28 +0000 (07:58 +0200)
And therefore one may not be able to subtract the pointers,
for example in HP-UX.

pp_sys.c

index 4634c0e..7c64ae1 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3642,7 +3642,7 @@ PP(pp_fttext)
         /* Here contains a variant under UTF-8 .  See if the entire string is
          * UTF-8. */
         if (is_utf8_fixed_width_buf_flags(first_variant,
-                                          len - ((char *) first_variant - s),
+                                          len - ((char *) first_variant - (char *) s),
                                           0))
         {
             if (PL_op->op_type == OP_FTTEXT) {