projects
/
platform
/
core
/
uifw
/
libhangul.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d7bd4d
)
마지막 글자를 nul로 채움
author
Choe Hwanjin
<choe.hwanjin@gmail.com>
Fri, 17 Nov 2006 11:36:40 +0000
(20:36 +0900)
committer
Choe Hwanjin
<choe.hwanjin@gmail.com>
Fri, 17 Nov 2006 11:36:40 +0000
(20:36 +0900)
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@98
8f00fcd2
-89fc-0310-932e-
b01be5b65e01
test/hangul.c
patch
|
blob
|
history
diff --git
a/test/hangul.c
b/test/hangul.c
index
37130fb
..
b44b76c
100644
(file)
--- a/
test/hangul.c
+++ b/
test/hangul.c
@@
-48,6
+48,11
@@
void ucs4_to_utf8(char *buf, const ucschar *ucs4, size_t bufsize)
ret = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
iconv_close(cd);
+
+ if (outbytesleft > 0)
+ *outbuf = '\0';
+ else
+ buf[bufsize - 1] = '\0';
}
int