[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wcasestrstr patch incorrect?
From: |
Jürgen Kahrs |
Subject: |
Re: wcasestrstr patch incorrect? |
Date: |
Sat, 13 Jan 2007 21:32:38 +0100 |
User-agent: |
Thunderbird 1.5.0.8 (X11/20060911) |
Andrew J. Schorr wrote:
> The patched code results in this 'for' loop:
>
> for (j = 0; j < needle_len; j++, start++) {
> wchar_t h, n;
>
> h = towlower(*start);
> n = towlower(needle[j]);
> if (h != n)
> continue;
> }
>
> Coming at the end of the 'for' loop, doesn't the continue statement
> have no effect? It seems to me like the previous 'goto out'
> code was correct...
Yes, you are right. The "continue" should be reverted
to the "goto". Arnold probably intended to do a
"continue" on the outer loop (i) (which would be
equivalent to a "goto"). But he forgot that the
"continue" always works on the inner loop (j).