handle right cases where both argumnets to number_ are bound.

This commit is contained in:
Vitor Santos Costa 2010-02-26 12:01:24 +00:00
parent b316710db5
commit 0e9a98fa30
1 changed files with 2 additions and 2 deletions

View File

@ -1937,7 +1937,7 @@ p_number_chars(void)
return FALSE;
}
}
if (IsNonVarTerm(t1)) {
if (IsNonVarTerm(t1) && IsVarTerm(t)) {
Term NewT;
if (!IsNumTerm(t1)) {
Yap_Error(TYPE_ERROR_NUMBER, t1, "number_chars/2");
@ -2147,7 +2147,7 @@ p_number_codes(void)
return FALSE;
}
}
if (IsNonVarTerm(t1)) {
if (IsNonVarTerm(t1) && IsVarTerm(t)) {
if (IsIntTerm(t1)) {
#if SHORT_INTS
sprintf(String, "%ld", IntOfTerm(t1));