fix bug in sub_atom when substring is largwer than string

This commit is contained in:
Vitor Santos Costa 2013-08-08 14:11:45 -05:00
parent 5f741122fa
commit 2c769767a4

View File

@ -2313,6 +2313,8 @@ init_sub_atom( USES_REGS1 )
Yap_unify(ARG1, ARG5) &&
Yap_unify(ARG2, MkIntegerTerm(0)) &&
Yap_unify(ARG4, MkIntegerTerm(0));
} else if (len > sz) {
cut_fail();
} else {
mask |= SUB_ATOM_HAS_SIZE;
min = 0;