fix empty slots in unnumbervars.
This commit is contained in:
parent
e33712403f
commit
749a5103a1
@ -4514,17 +4514,27 @@ unnumber_complex_term(CELL *pt0, CELL *pt0_end, CELL *ptf, CELL *HLow, int share
|
||||
if (ASP-(max+1) <= H) {
|
||||
goto overflow;
|
||||
}
|
||||
/* we found this before */
|
||||
*ptf++ = ASP[-id-1];
|
||||
/* we found this before? */
|
||||
if (ASP[-id-1])
|
||||
*ptf++ = ASP[-id-1];
|
||||
else {
|
||||
RESET_VARIABLE(ptf);
|
||||
ASP[-id-1] = (CELL)ptf;
|
||||
ptf++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
max = id;
|
||||
if (ASP-(max+1) <= H) {
|
||||
/* alloc more space */
|
||||
if (ASP-(id+1) <= H) {
|
||||
goto overflow;
|
||||
}
|
||||
while (id > max) {
|
||||
ASP[-(id+1)] = 0L;
|
||||
max++;
|
||||
}
|
||||
/* new variable */
|
||||
RESET_VARIABLE(ptf);
|
||||
ASP[-id-1] = (CELL)ptf;
|
||||
ASP[-(id+1)] = (CELL)ptf;
|
||||
ptf++;
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user