fix bug in sub_atom when substring is largwer than string
This commit is contained in:
parent
5f741122fa
commit
2c769767a4
@ -2313,6 +2313,8 @@ init_sub_atom( USES_REGS1 )
|
|||||||
Yap_unify(ARG1, ARG5) &&
|
Yap_unify(ARG1, ARG5) &&
|
||||||
Yap_unify(ARG2, MkIntegerTerm(0)) &&
|
Yap_unify(ARG2, MkIntegerTerm(0)) &&
|
||||||
Yap_unify(ARG4, MkIntegerTerm(0));
|
Yap_unify(ARG4, MkIntegerTerm(0));
|
||||||
|
} else if (len > sz) {
|
||||||
|
cut_fail();
|
||||||
} else {
|
} else {
|
||||||
mask |= SUB_ATOM_HAS_SIZE;
|
mask |= SUB_ATOM_HAS_SIZE;
|
||||||
min = 0;
|
min = 0;
|
||||||
|
Reference in New Issue
Block a user