summaryrefslogtreecommitdiff
path: root/repl.c
diff options
context:
space:
mode:
authorPeter Mikkelsen <peter@pmikkelsen.com>2021-07-03 21:16:58 +0000
committerPeter Mikkelsen <peter@pmikkelsen.com>2021-07-03 21:16:58 +0000
commit3f26a0f2a1f699e628136ec5be6178b5ab40fc44 (patch)
tree5f288b697076387d59111a5731dfdfeec380c447 /repl.c
parent66a7040df6897e60ee1a513b95f4b04e687bbf0a (diff)
Make the goalstack global just like the choicestack
Diffstat (limited to 'repl.c')
-rw-r--r--repl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/repl.c b/repl.c
index bd584eb..bf08164 100644
--- a/repl.c
+++ b/repl.c
@@ -15,6 +15,8 @@ repl(Term *database)
print("?- ");
Term *query = parse(fd, nil, 1);
Binding *bindings = nil;
+ choicestack = nil;
+ goalstack = nil; /* should free old choicestack and goalstack */
int success;
FindMore:
success = evalquery(database, query, &bindings);