fix NStringToList
This commit is contained in:
parent
6e67a84ab0
commit
c56ad7a80d
@ -1135,10 +1135,10 @@ Term
|
|||||||
Yap_NStringToList(char *s, size_t len)
|
Yap_NStringToList(char *s, size_t len)
|
||||||
{
|
{
|
||||||
Term t;
|
Term t;
|
||||||
char *cp = s + len;
|
unsigned char *cp = (unsigned char *)s + len;
|
||||||
|
|
||||||
t = MkAtomTerm(AtomNil);
|
t = MkAtomTerm(AtomNil);
|
||||||
while (cp > s) {
|
while (cp > (unsigned char *)s) {
|
||||||
t = MkPairTerm(MkIntegerTerm(*--cp), t);
|
t = MkPairTerm(MkIntegerTerm(*--cp), t);
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
|
Reference in New Issue
Block a user