Permalink
Browse files

mg.h: Use valid_utf8_length()

  • Loading branch information...
khwilliamson committed Dec 7, 2017
1 parent e41e074 commit a0492f03e69c8d9fa2248ab51d364997b7820d73
Showing with 1 addition and 1 deletion.
  1. +1 −1 mg.h
View
2 mg.h
@@ -68,7 +68,7 @@ struct magic {
SvPOK(sv) && (!SvGMAGICAL(sv) || sv_only_taint_gmagic(sv)) \
? (mg)->mg_len = (off), (mg)->mg_flags |= MGf_BYTES \
: ((mg)->mg_len = DO_UTF8(sv) \
? (SSize_t)utf8_length((U8 *)(pv), (U8 *)(pv)+(off)) \
? (SSize_t)valid_utf8_length((U8 *)(pv), (U8 *)(pv)+(off)) \
: (SSize_t)(off), \
(mg)->mg_flags &= ~MGf_BYTES))
#endif

0 comments on commit a0492f0

Please sign in to comment.