This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for d4c027436f
[perl5.git] / mg.h
diff --git a/mg.h b/mg.h
index 29e339f..81ed296 100644 (file)
--- a/mg.h
+++ b/mg.h
@@ -66,8 +66,8 @@ struct magic {
     SvPOK(sv) && !SvGMAGICAL(sv)                          \
        ? (mg)->mg_len = (off), (mg)->mg_flags |= MGf_BYTES \
        : ((mg)->mg_len = DO_UTF8(sv)                        \
-           ? utf8_length((U8 *)(pv), (U8 *)(pv)+(off))       \
-           : (off),                                           \
+           ? (SSize_t)utf8_length((U8 *)(pv), (U8 *)(pv)+(off)) \
+           : (SSize_t)(off),                                     \
           (mg)->mg_flags &= ~MGf_BYTES))
 #endif