fixed bug in MEMBER_MULTINAME
[swftools.git] / lib / as3 / parser.y
index 2f8212e..6808ae8 100644 (file)
@@ -293,7 +293,7 @@ DECLARE_LIST(state);
     namespace_t m##_ns;\
     registry_fill_multiname(&m, &m##_ns, x);
                     
-#define MEMBER_MULTINAME(m,f) \
+#define MEMBER_MULTINAME(m,f,n) \
     multiname_t m;\
     namespace_t m##_ns;\
     if(f) { \
@@ -307,7 +307,7 @@ DECLARE_LIST(state);
         m.type = MULTINAME; \
         m.ns =0; \
         m.namespace_set = &nopackage_namespace_set; \
-        m.name = f->name; \
+        m.name = n; \
     }
 
 /* warning: list length of namespace set is undefined */
@@ -931,7 +931,7 @@ code_t*defaultvalue(code_t*c, classinfo_t*type)
     } else if(TYPE_IS_UINT(type)) {
        c = abc_pushuint(c, 0);
     } else if(TYPE_IS_FLOAT(type)) {
-       c = abc_pushdouble(c, 0.0);
+       c = abc_pushnan(c);
     } else if(TYPE_IS_BOOLEAN(type)) {
        c = abc_pushfalse(c);
     } else {
@@ -2081,7 +2081,7 @@ E : "super" '.' T_IDENTIFIER
 
               memberinfo_t*f = registry_findmember(t, $3);
               namespace_t ns = {flags2access(f->flags), ""};
-              MEMBER_MULTINAME(m, f);
+              MEMBER_MULTINAME(m, f, $3);
               $$.c = 0;
               $$.c = abc_getlocal_0($$.c);
               $$.c = abc_getsuper2($$.c, &m);
@@ -2104,7 +2104,7 @@ E : E '.' T_IDENTIFIER
                  if(f && f->slot && !noslot) {
                      $$.c = abc_getslot($$.c, f->slot);
                  } else {
-                     MEMBER_MULTINAME(m, f);
+                     MEMBER_MULTINAME(m, f, $3);
                      $$.c = abc_getproperty2($$.c, &m);
                  }
                  /* determine type */