go-xmlpath / xmlpath

Strict subset of the XPath specification for the Go language.
http://gopkg.in/xmlpath.v2
Other
115 stars 37 forks source link

Equals operator index out of range #6

Open kevburnsjr opened 9 years ago

kevburnsjr commented 9 years ago

When the library tries to compare the value of a node with a string that matches the first few characters, it breaks. So it tries to match "1" to "10" and experiences an index out of range error due to an off-by-one error in node text length calculation.

https://gist.github.com/KevBurnsJr/bf71fe52cdc5cc706609