This commit is contained in:
Vitor Santos Costa
2018-07-02 16:48:00 +01:00
parent 71aed8b870
commit fd492b5b16
8 changed files with 37 additions and 32 deletions

View File

@@ -161,8 +161,7 @@ static bool consult(const char *b_file USES_REGS) {
/* consult in C */
int lvl = push_text_stack();
char *full = Malloc(YAP_FILENAME_MAX + 1);
full[0] = '\0';
char *full;
/* the consult mode does not matter here, really */
if ((osno = Yap_CheckAlias(AtomLoopStream)) < 0) {
osno = 0;
@@ -213,8 +212,12 @@ static bool consult(const char *b_file USES_REGS) {
}
BACKUP_MACHINE_REGS();
YAP_EndConsult(c_stream, &osno, full);
pop_text_stack(lvl);
return true;
if (!Yap_AddAlias(AtomLoopStream, osno)) {
pop_text_stack(lvl);
return false;
}
pop_text_stack(lvl);
return true;
}
///