Properly count bytes in make-string

This commit is contained in:
Justin Ethier 2017-11-07 17:47:08 -05:00
parent f5787184da
commit 02014322b7

View file

@ -958,7 +958,8 @@
Cyc_rt_raise2(data, \"Expected character buf received\", fill);
}
c = obj_obj2char(fill);
buflen = Cyc_utf8_encode_char(ch_buf, 5, c);
Cyc_utf8_encode_char(ch_buf, 5, c);
buflen = strlen(ch_buf);
num_cp = obj_obj2int(count);
len = num_cp * buflen;
if (len >= MAX_STACK_OBJ) {