OSDN Git Service
(root)
/
neighbornote
/
NeighborNote.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9424126
)
Correct string out of bounds exception when editing LaTeX formula.
author
Randy Baumgarte
<randy@fbn.cx>
Wed, 21 Dec 2011 15:20:19 +0000
(10:20 -0500)
committer
Randy Baumgarte
<randy@fbn.cx>
Wed, 21 Dec 2011 15:20:19 +0000
(10:20 -0500)
src/cx/fbn/nevernote/xml/HtmlTagModifier.java
patch
|
blob
|
history
diff --git
a/src/cx/fbn/nevernote/xml/HtmlTagModifier.java
b/src/cx/fbn/nevernote/xml/HtmlTagModifier.java
index
9a4eeeb
..
6b327cb
100644
(file)
--- a/
src/cx/fbn/nevernote/xml/HtmlTagModifier.java
+++ b/
src/cx/fbn/nevernote/xml/HtmlTagModifier.java
@@
-75,12
+75,13
@@
public class HtmlTagModifier {
}
\r
\r
public void replaceValue(int position, String attribute, String newValue) {
\r
+
\r
int endPosition = html.indexOf(">", position);
\r
if (endPosition < 0)
\r
return;
\r
\r
int attributeStart = html.indexOf(attribute, position);
\r
- if (attributeStart < 0)
\r
+ if (attributeStart < 0
|| attributeStart > endPosition
)
\r
return;
\r
\r
int attributeEnd = html.indexOf(" ", attributeStart);
\r