mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-11 06:47:37 +02:00
Properly count bytes in make-string
This commit is contained in:
parent
f5787184da
commit
02014322b7
1 changed files with 2 additions and 1 deletions
|
@ -958,7 +958,8 @@
|
||||||
Cyc_rt_raise2(data, \"Expected character buf received\", fill);
|
Cyc_rt_raise2(data, \"Expected character buf received\", fill);
|
||||||
}
|
}
|
||||||
c = obj_obj2char(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);
|
num_cp = obj_obj2int(count);
|
||||||
len = num_cp * buflen;
|
len = num_cp * buflen;
|
||||||
if (len >= MAX_STACK_OBJ) {
|
if (len >= MAX_STACK_OBJ) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue