aboutsummaryrefslogtreecommitdiffstats
path: root/src/cnki_hn.c
diff options
context:
space:
mode:
authoryzrh <yzrh@noema.org>2020-12-31 18:43:29 +0000
committeryzrh <yzrh@noema.org>2020-12-31 18:45:02 +0000
commit3bd7ea7520e13f5fabcfadb1a7630398bc1dca6d (patch)
tree1f8336f75ee871574e37abbe49ddbaafcf7e88fc /src/cnki_hn.c
parent1f62c53da6edc5a82a1e0eceb401b2274cd4a0d1 (diff)
downloadmelon-3bd7ea7520e13f5fabcfadb1a7630398bc1dca6d.tar.gz
melon-3bd7ea7520e13f5fabcfadb1a7630398bc1dca6d.tar.zst
Improve portability.
Diffstat (limited to 'src/cnki_hn.c')
-rw-r--r--src/cnki_hn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cnki_hn.c b/src/cnki_hn.c
index d402c0c..f6a4c24 100644
--- a/src/cnki_hn.c
+++ b/src/cnki_hn.c
@@ -172,7 +172,7 @@ cnki_hn(cnki_t **param)
conv_src[0] = buf[i + 7];
conv_src[1] = buf[i + 6];
- conv_size = 512;
+ conv_size = 6;
if (strconv(&conv_dst, "UTF-16BE",
conv_src, "GB18030", &conv_size) == 0) {
@@ -202,7 +202,7 @@ cnki_hn(cnki_t **param)
conv_src[0] = ptr->text[i + 3];
conv_src[1] = ptr->text[i + 2];
- conv_size = 512;
+ conv_size = 6;
if (strconv(&conv_dst, "UTF-16BE",
conv_src, "GB18030", &conv_size) == 0) {