[AD] Unicode again

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


That's a little disturbing: the further I dig into the Unicode stuff, the
more I find bugs...

This time it turns out that ustrncpy() and ustrncat() are badly flawed: they
can write more bytes than they have been instructed to.

And ustrncpy() doesn't behave the same as the ANSI strncpy(): the former
always appends a terminating null character whereas, according to my docs,
the latter doesn't. I don't think we should change that now, but we must
update the docs.

The patch is attached, if someone could check and commit it...

--
Eric Botcazou
ebotcazou@xxxxxxxxxx

Attachment: ustrncpy.zip
Description: Zip compressed data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/