fix restore foreign functions

This commit is contained in:
Vítor Santos Costa 2010-12-07 18:21:10 +00:00
parent 1bbded5ef7
commit e7f5c50707

View File

@ -242,9 +242,10 @@ Yap_ReOpenLoadForeign(void)
{
ForeignObj *f_code = ForeignCodeLoaded;
Term OldModule = CurrentModule;
YapInitProc InitProc = NULL;
while (f_code != NULL) {
YapInitProc InitProc = NULL;
CurrentModule = f_code->module;
if(Yap_ReLoadForeign(f_code->objs,f_code->libs,f_code->f,&InitProc)==LOAD_SUCCEEDED) {
if (InitProc)