[uim-commit] r341 - trunk/uim
makeinu@freedesktop.org
makeinu@freedesktop.org
Thu Jan 20 22:50:07 PST 2005
Author: makeinu
Date: 2005-01-20 22:50:04 -0800 (Thu, 20 Jan 2005)
New Revision: 341
Modified:
trunk/uim/uim-custom.c
Log:
* uim/uim-custom.c:
- (c_list_to_str): Terminate the string by NUL character.
Modified: trunk/uim/uim-custom.c
===================================================================
--- trunk/uim/uim-custom.c 2005-01-21 06:28:04 UTC (rev 340)
+++ trunk/uim/uim-custom.c 2005-01-21 06:50:04 UTC (rev 341)
@@ -120,7 +120,7 @@
char *buf, *bufp, *str;
const void *const *elem;
- buf_size = sizeof('\0');
+ buf_size = sizeof(char);
for (elem = list; *elem; elem++) {
if (elem != list)
buf_size += strlen(sep);
@@ -140,6 +140,7 @@
bufp += strlen(str);
free(str);
}
+ buf[buf_size - 1] = '\0';
return buf;
}
More information about the Uim-commit
mailing list