Trustin Lee wrote:
Hi James,

On 1/23/07, James Im <[EMAIL PROTECTED]> wrote:

I need your help to determine if I have found a bug or not.

I use a slightly modified version of TextLineDecoder and I got an error
in decodeNormal() at line 272 (the line number correspond to the version
on the trunk):

in.limit( in.limit() - matchCount + oldMatchCount );


After investigating a bit I found that I was trying to set the limit to
8193 which was greater than the capacity (8192). Thus the error.

I've investigated some more and I saw that it happened when the
matchCount passed to decodeNormal() was 1 instead of 0.

I've investigated some more and I think that oldMatchCount should be
reset to zero when you have found a match.

Thus, after line 261 I have added:
oldMatchCount=0;


Thank you for reporting a bug.  I agree with you that it's a bug.  Don't we
need to reset oldMatchCount whenever we reset matchCount, instead of adding
one sentence in line 261?

It would also be the best if you can create a JIRA issue for us, and attach
a patch file.

Thanks,
Trustin

No, I'm not sure that we need to reset oldMatchCount whenever we reset
matchCount.

I rather beleive that oldMatchCount must be reset after a call to:
"in.limit( pos - matchCount + oldMatchCount );"

How to be sure?

BTW, how do you do a patch?

_________________________________________________________________
Opret en personlig blog og del dine billeder på MSN Spaces: http://spaces.msn.com/

Reply via email to