fix bug in big num to string
This commit is contained in:
parent
6e9e383914
commit
e1dcdf0728
@ -360,11 +360,11 @@ Yap_OpaqueTermToString(Term t, char *str, size_t max)
|
||||
{
|
||||
size_t str_index = 0;
|
||||
CELL * li = RepAppl(t);
|
||||
unsigned char *ptr = (unsigned char *)StringOfTerm(AbsAppl(li));
|
||||
if (li[0] == (CELL)FunctorString) {
|
||||
str_index += sprintf(& str[str_index], "\"");
|
||||
do {
|
||||
utf8proc_int32_t chr;
|
||||
unsigned char *ptr = (unsigned char *)StringOfTerm(AbsAppl(li));
|
||||
ptr += get_utf8(ptr, &chr);
|
||||
if (chr == '\0') break;
|
||||
str_index += sprintf(str+str_index, "%C", chr);
|
||||
|
Reference in New Issue
Block a user