summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-01-16 01:53:11 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-01-16 01:53:11 -0800
commit899b2a2a06a5febb3707170cb90c09b3417fd9f6 (patch)
tree3b05ff3bb9c674f7bf4851abf6cd65c382ade209 /struct.c
parent7b807746cd98b883d16865b755f320c6579d06e1 (diff)
downloadtxr-899b2a2a06a5febb3707170cb90c09b3417fd9f6.tar.gz
txr-899b2a2a06a5febb3707170cb90c09b3417fd9f6.tar.bz2
txr-899b2a2a06a5febb3707170cb90c09b3417fd9f6.zip
bugfix: supertype check in make-struct-type.
* struct.c (make_struct_type): Fix test of incorrect variable which renders the supertype test useless, causing the type to be created with no supertype.
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/struct.c b/struct.c
index 7517b8dd..ac17ee26 100644
--- a/struct.c
+++ b/struct.c
@@ -241,7 +241,7 @@ val make_struct_type(val name, val super,
if (super && symbolp(super)) {
val supertype = find_struct_type(super);
- if (!super)
+ if (!supertype)
no_such_struct(self, super);
super = supertype;
} else if (super) {