summaryrefslogtreecommitdiff
path: root/parse/node.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-06-17 23:05:06 -0700
committerOri Bernstein <ori@eigenstate.org>2016-06-17 23:05:06 -0700
commit1ed355447b8aa5aa8861651d5a657691fe939218 (patch)
tree12d099d11680c05e5c80b73d93b5f0999e52a7c4 /parse/node.c
parent3d7695c257de8ea4d4c0b8999682de0b29ee3c20 (diff)
downloadmc-1ed355447b8aa5aa8861651d5a657691fe939218.tar.gz
Allow implementing traits from other namespaces.
Diffstat (limited to 'parse/node.c')
-rw-r--r--parse/node.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse/node.c b/parse/node.c
index 36adac8..14822d4 100644
--- a/parse/node.c
+++ b/parse/node.c
@@ -328,7 +328,8 @@ Node *mknsname(Srcloc loc, char *ns, char *name)
Node *n;
n = mknode(loc, Nname);
- n->name.ns = strdup(ns);
+ if (ns)
+ n->name.ns = strdup(ns);
n->name.name = strdup(name);
return n;