| Karim BELABAS on Tue, 9 Mar 1999 12:23:30 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: pari-2.0.14 bugs |
Igor Schein wrote:
> 4) I discovered a weird completion bug on Linux and Cygwin. When I
> hit <TAB> to complete the 10 character long function
> (e.g. vecextract(), bnfcertify() etc. ), it either adds '^y' character
> in the and, or segfaults.
It seems many people can reproduce this after all; I still can't. From
staring at the code, I guess the following patchlet might cure the symptoms
(and possibly the illness also). [Completion proper is not broken, but an
off-by-1 error when appending the parentheses]. Am I right ?
Karim.
*** src/gp/gp_rl.c.orig Fri Mar 5 18:29:29 1999
--- src/gp/gp_rl.c Tue Mar 9 12:21:40 1999
***************
*** 241,247 ****
static void
match_concat(char **matches, char *s)
{
! int i = strlen(matches[0]);
matches[0] = (char*) gprealloc(matches[0], i+strlen(s), i);
strcat(matches[0],s);
}
--- 241,247 ----
static void
match_concat(char **matches, char *s)
{
! int i = strlen(matches[0]) + 1;
matches[0] = (char*) gprealloc(matches[0], i+strlen(s), i);
strcat(matches[0],s);
}
--
Karim Belabas email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France) Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://hasse.mathematik.tu-muenchen.de/ntsw/pari/