Re: [Nautilus-list] PATCH: linefeed problem for librsvg
- From: Havoc Pennington <hp redhat com>
- To: Darin Adler <darin bentspoon com>
- Cc: Akira TAGOH <tagoh redhat com>, nautilus-list eazel com
- Subject: Re: [Nautilus-list] PATCH: linefeed problem for librsvg
- Date: 21 Jul 2001 13:45:19 -0400
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.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]