u_char bytes[4];
} _GB18030State;
-__private_extern__ int
+int
_GB18030_init(struct __xlocale_st_runelocale *xrl)
{
}
ncopy = MIN(MIN(n, GB18030_MB_CUR_MAX), sizeof(gs->bytes) - gs->count);
- memcpy(gs->bytes + gs->count, s, ncopy);
+ strncpy((char*)(gs->bytes + gs->count), s, ncopy);
ocount = gs->count;
gs->count += ncopy;
s = (char *)gs->bytes;