aspell-devel
[Top][All Lists]
Advanced

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

Re: [aspell-devel] Endless loop with sylpheed


From: Kevin Atkinson
Subject: Re: [aspell-devel] Endless loop with sylpheed
Date: Sat, 29 Jan 2005 13:14:05 -0700 (MST)

On Sat, 29 Jan 2005, James Lee wrote:

> Hello,
> 
> There is a problem aspell-0.60.2 when running with sylpheed-claws-1.0.0.
> When opening the edit window for the first time it gets stuck in an
> endless loop.  Sending it signal abort shows it gets stuck in this loop
> in lib/find_speller.cpp, in function void BetterVariety::set_cur_rank():
> 
>         for (; *c != '\0'; c += p) {
>           ++num;
>           p = strcspn(c, "-");
>           if (p == s && memcmp(m, c, s) == 0) {match = true; break;}
>         }
> 
> The problem is when c has a '-' p is not incremented because on
> subsequent loops c begins with '-' and p is zero.  The hyphen is in the
> dictionary name and using dictionaries without variants avoids the
> problem.
> 
> I think aspell should step over the hyphen as well as the chars matched
> by strcspn(), for example, changing the first line thus allows it to
> run:
>         for (; *c != '\0'; c += p + 1) {
> 
> I've no idea what that does to the intent of the program, the above is
> not supposed to be the solution but merely a hint at the problem.


What is the string that is being used for "variety" or "jargon".

-- 
http://kevin.atkinson.dhs.org





reply via email to

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