Re: [Nautilus-list] PATCH: linefeed problem for librsvg

Darin Adler <darin bentspoon com> writes:
> On Thursday, July 19, 2001, at 12:55  AM, Akira TAGOH wrote:
> > Please commit this patch.
> >
> >  	/* Alloc max length of wide char */
> >  	wcstr = g_new0 (wchar_t, length);
> > -	wclength = mbstowcs (wcstr, str, length);
> > +	tmpstr = g_strndup (str, length);
> > +	wclength = mbstowcs (wcstr, tmpstr, length);
> Could you please explain why making a truncated copy of str (in
> tmpstr) is helpful and necessary? I'd like to understand this fix
> before I commit it.

IIRC the bug report was that text was "doubled" in the sidebar (so if
the text was supposed to be "foo" it was "foofoo" in multibyte
locales).  I haven't looked at the patch but maybe this helps figure
it out. Perhaps the doubling was just a random phenomenon and really
there was memory junk or something.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]