diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/convert.c | 4 | ||||
-rw-r--r-- | mbbsd/kaede.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/mbbsd/convert.c b/mbbsd/convert.c index 1fcb078f..f07e21db 100644 --- a/mbbsd/convert.c +++ b/mbbsd/convert.c @@ -31,7 +31,7 @@ static int utf8_read(int fd, void *buf, size_t count) { count = read(fd, buf, count); if (count > 0) { - strcpy(buf, utf8_uni(buf, &count, 0)); + utf8_uni(buf, &count, 0); uni2big(buf, &count, 0); ((char *)buf)[count] = 0; } @@ -40,7 +40,7 @@ static int utf8_read(int fd, void *buf, size_t count) static int utf8_write(int fd, void *buf, size_t count) { - strcpy(buf, big2uni(buf, &count, 0)); + big2uni(buf, &count, 0); uni_utf8(buf, &count, 0); ((char *)buf)[count] = 0; return write(fd, buf, count); diff --git a/mbbsd/kaede.c b/mbbsd/kaede.c index 486e5aef..9023557d 100644 --- a/mbbsd/kaede.c +++ b/mbbsd/kaede.c @@ -58,8 +58,7 @@ Ptt_prints(char *str, int mode) } } strbuf[w] = 0; - strcpy(str, strbuf); - strip_ansi(str, str, mode); + strip_ansi(str, strbuf, mode); return str; } |