Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringIndexOutOfBoundsException in breakText() #3

Open
GoogleCodeExporter opened this issue Jun 12, 2015 · 5 comments
Open

StringIndexOutOfBoundsException in breakText() #3

GoogleCodeExporter opened this issue Jun 12, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

This code is bug prone (line 514, method 

while( input.charAt(pos) != ' ' ) {
    pos--;
}

Under some cases, if there's no space at all, you can easily go below the 
range. The while() should be rather:

while( (pos >= 0) && (input.charAt(pos) != ' ' ) )

Original issue reported on code.google.com by [email protected] on 27 Feb 2012 at 11:17

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

No branches or pull requests

1 participant