summaryrefslogtreecommitdiff
path: root/parse/use.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-25 20:39:57 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-25 20:39:57 -0800
commit79bd9957c85b57f31089719c9715e66e99296bbc (patch)
tree580f81b821e9fa79c5f6c0a4dc1d130b9a9b405c /parse/use.c
parent505618290f159d5453d2e86abdb8f4297e846f74 (diff)
downloadmc-79bd9957c85b57f31089719c9715e66e99296bbc.tar.gz
Export aux types correctly.
We were skipping marking them writable and exporting them. Oops.
Diffstat (limited to 'parse/use.c')
-rw-r--r--parse/use.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/parse/use.c b/parse/use.c
index 24e8da7..949e069 100644
--- a/parse/use.c
+++ b/parse/use.c
@@ -415,9 +415,9 @@ Trait *traitunpickle(FILE *fd)
tr->ishidden = rdbool(fd);
tr->name = unpickle(fd);
tr->param = tyunpickle(fd);
- n = rdint(fd);
- tr->aux = zalloc(n * sizeof(Type*));
- for (i = 0; i < n; i++)
+ tr->naux = rdint(fd);
+ tr->aux = zalloc(tr->naux * sizeof(Type*));
+ for (i = 0; i < tr->naux; i++)
rdtype(fd, &tr->aux[i]);
n = rdint(fd);
for (i = 0; i < n; i++)