You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@apache.org on 2001/08/29 22:49:48 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/compiler Lexer.java
mmidy 01/08/29 13:49:48
Modified: java/src/org/apache/xpath/compiler Lexer.java
Log:
Fix for Bugzilla 2684 StringIndexOutOfBounds Exception. Check if we are at the end of the pattern string.
Revision Changes Path
1.8 +2 -2 xml-xalan/java/src/org/apache/xpath/compiler/Lexer.java
Index: Lexer.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/Lexer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Lexer.java 2001/07/27 22:47:00 1.7
+++ Lexer.java 2001/08/29 20:49:48 1.8
@@ -196,7 +196,7 @@
for (i++; (i < nChars) && ((c = pat.charAt(i)) != '\"'); i++);
- if (c == '\"')
+ if (c == '\"' && i < nChars)
{
addToTokenQueue(pat.substring(startSubstring, i + 1));
@@ -230,7 +230,7 @@
for (i++; (i < nChars) && ((c = pat.charAt(i)) != '\''); i++);
- if (c == '\'')
+ if (c == '\'' && i < nChars)
{
addToTokenQueue(pat.substring(startSubstring, i + 1));
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org