Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

LineReader.hasNextLine go to a endless loop when LineReader.buffer is empty #19

Merged
merged 1 commit into from
Feb 21, 2012

Conversation

e7h4n
Copy link
Contributor

@e7h4n e7h4n commented Feb 20, 2012

   while(this.buffer.indexOf('\n') === -1) {                                
        this.getBufferAndSetCurrentPosition(this.currentPosition);           
        if(this.currentPosition === -1) return false;                        
        if(this.buffer.length === 0) return false;  // add this line                                                          
    }       

ryanmcgrath pushed a commit that referenced this pull request Feb 21, 2012
LineReader.hasNextLine go to a endless loop when LineReader.buffer is empty
@ryanmcgrath ryanmcgrath merged commit 6caa8c9 into ryanmcgrath:master Feb 21, 2012
@ghost ghost assigned ryanmcgrath Feb 21, 2012
@ryanmcgrath
Copy link
Owner

Beautiful! Thanks for catching, will push out a point release shortly. ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants