summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-13 22:26:00 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-13 22:26:00 -0800
commit5a1d952aa7f08885c8de6afbbfa948c675f79f89 (patch)
treefd1ee8287965627f8e654600bff812129de6dfc7 /parse/stab.c
parentc39b0cd430515c79ce14792b6f815cb7dd9f6e90 (diff)
downloadmc-5a1d952aa7f08885c8de6afbbfa948c675f79f89.tar.gz
Fix a couple of segfaults.
We should actually use valid values when generating errors.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse/stab.c b/parse/stab.c
index f1db002..c139e23 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -318,7 +318,7 @@ void updatetype(Stab *st, Node *n, Type *t)
int mergetype(Type *old, Type *new)
{
if (!new) {
- lfatal(new->loc, "double prototyping of %s", tystr(new));
+ lfatal(old->loc, "double prototyping of %s", tystr(new));
}
else if (old->vis == Visexport && new->vis != Visexport) {
if (!old->sub && new->sub) {