From fb6b44a96ee7dc6c9630730b8368bf840721a122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Mon, 4 Apr 2011 14:36:06 +0100 Subject: [PATCH] be sure to reinitialise IO after Restore. --- C/save.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C/save.c b/C/save.c index f2ade41aa..d4dcf45d6 100755 --- a/C/save.c +++ b/C/save.c @@ -1762,6 +1762,9 @@ Restore(char *s, char *lib_dir USES_REGS) } Yap_ReOpenLoadForeign(); + FreeRecords(); + /* restart IO */ + initIO(); /* reset time */ Yap_ReInitWallTime(); Yap_InitSysPath(); @@ -1770,7 +1773,6 @@ Restore(char *s, char *lib_dir USES_REGS) Yap_InitPreAllocCodeSpace(); } #endif - FreeRecords(); CloseRestore(); if (which_save == 2) { Yap_unify(ARG2, MkIntTerm(0));