Check for UTF8 flag on name after magic/overloading is performed
Leon Timmermans [Thu, 18 Aug 2016 18:48:20 +0000 (20:48 +0200)]
Name.xs

diff --git a/Name.xs b/Name.xs
index 6168073..3484085 100644 (file)
--- a/Name.xs
+++ b/Name.xs
@@ -40,8 +40,8 @@ subname(name, sub)
        const char *s, *end = NULL, *begin = NULL;
        MAGIC *mg;
        STRLEN namelen;
-       int utf8flag = SvUTF8(name);
        const char* nameptr = SvPV(name, namelen);
+       int utf8flag = SvUTF8(name);
        int seen_quote = 0, need_subst = 0;
     PPCODE:
        if (!SvROK(sub) && SvGMAGICAL(sub))