fix indexing of bignums (obs from Jos de Roo).

This commit is contained in:
Vitor Santos Costa
2010-05-14 12:42:30 +01:00
parent c2f84c9e28
commit fd9f4efe0b
8 changed files with 83 additions and 93 deletions

View File

@@ -670,8 +670,12 @@
break;
case _get_bigint:
if (is_regcopy(myregs, nofregs, cl->u.xc.x)) {
clause->Tag = AbsAppl((CELL *)FunctorBigInt);
clause->u.t_ptr = (CELL)NULL;
if (IsApplTerm(cl->u.xc.c)) {
CELL *pt = RepAppl(cl->u.xc.c);
clause->Tag = AbsAppl((CELL *)pt[0]);
clause->u.t_ptr = cl->u.xc.c;
} else
clause->Tag = cl->u.xc.c;
return;
}
cl = NEXTOP(cl,xc);