bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Gnus crash


From: Kenichi Handa
Subject: Re: Gnus crash
Date: Mon, 20 Jan 2003 09:19:11 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <uel7blace.fsf@terra.es>, "Eduardo =?iso-8859-1?q?Mu=F1oz?=" 
<emufer@terra.es> writes:
> Kenichi Handa <handa@m17n.org> writes:
>>  Thank you for the report.  This bug was already fixed in the
>>  CVS HEAD by the attached patch.  Eduardo, could you please
>>  try the attached patch?

> I only have emacs-21.2 source here and the patch doesn't
> match the file editfns.c.

Strange.  The patch should be applied to 21.2 source too.
Anyway, I made a new patch for 21.2.  Please try again.

> Would be helpfull to download and build the current CVS
> version of emacs?

It will be helpfull, but please note that it contains lots
of new features that are not yet fully tested.

---
Ken'ichi HANDA
handa@m17n.org


--- editfns.c.orig      Thu Mar 14 04:52:17 2002
+++ editfns.c   Mon Jan 20 09:11:03 2003
@@ -3169,6 +3169,7 @@
     if (*format++ == '%')
       {
        int thissize = 0;
+       int actual_width = 0;
        unsigned char *this_format_start = format - 1;
        int field_width, precision;
 
@@ -3249,6 +3250,7 @@
            if (*format != 's' && *format != 'S')
              error ("Format specifier doesn't match argument type");
            thissize = CONVERTED_BYTE_SIZE (multibyte, args[n]);
+           actual_width = lisp_string_width (args[n], -1, NULL, NULL);
          }
        /* Would get MPV otherwise, since Lisp_Int's `point' to low memory.  */
        else if (INTEGERP (args[n]) && *format != 's')
@@ -3302,7 +3304,7 @@
            goto string;
          }
 
-       thissize = max (field_width, thissize);
+       thissize += max (0, field_width - actual_width);
        total += thissize + 4;
       }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]