atom_oncat was not allocating memory right

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@353 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-02-11 20:22:15 +00:00
parent 90356f9993
commit 0dbc5373b4
7 changed files with 22 additions and 13 deletions

View File

@@ -622,7 +622,7 @@ static Int
p_atom_concat(void)
{
Term t1 = Deref(ARG1);
char *cptr = (char *)PreAllocCodeSpace(), *cpt0;
char *cptr = ((AtomEntry *)PreAllocCodeSpace())->StrOfAE, *cpt0;
char *top = (char *)AuxSp;
char *atom_str;
UInt sz;
@@ -670,8 +670,8 @@ p_atom_concat(void)
if (t1 == TermNil) {
Term tout;
cptr[0] = '\0';
ReleasePreAllocCodeSpace((ADDR)cpt0);
tout = MkAtomTerm(LookupAtom(cpt0));
ReleasePreAllocCodeSpace((ADDR)cpt0);
return(unify(ARG2, tout));
}
ReleasePreAllocCodeSpace((ADDR)cpt0);