Fixed advanced find tags not honoring start= when greater than match count
This commit is contained in:
parent
6f3d434046
commit
3c17ccc39d
2 changed files with 14 additions and 1 deletions
|
@ -1,7 +1,8 @@
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
???:
|
1.5:
|
||||||
- Added 'no info... yet' message when mods/ scan is still in-progress
|
- Added 'no info... yet' message when mods/ scan is still in-progress
|
||||||
|
- Fixed advanced find tags not honoring start= when greater than match count
|
||||||
- Changed FTLDat to allow opening dats in read-only mode
|
- Changed FTLDat to allow opening dats in read-only mode
|
||||||
|
|
||||||
1.4:
|
1.4:
|
||||||
|
|
|
@ -130,6 +130,9 @@ public class XMLPatcher {
|
||||||
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
matchedNodes.clear();
|
||||||
|
}
|
||||||
if ( panic && matchedNodes.isEmpty() )
|
if ( panic && matchedNodes.isEmpty() )
|
||||||
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
||||||
|
|
||||||
|
@ -182,6 +185,9 @@ public class XMLPatcher {
|
||||||
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
matchedNodes.clear();
|
||||||
|
}
|
||||||
if ( panic && matchedNodes.isEmpty() )
|
if ( panic && matchedNodes.isEmpty() )
|
||||||
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
||||||
|
|
||||||
|
@ -234,6 +240,9 @@ public class XMLPatcher {
|
||||||
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
matchedNodes.clear();
|
||||||
|
}
|
||||||
if ( panic && matchedNodes.isEmpty() )
|
if ( panic && matchedNodes.isEmpty() )
|
||||||
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
||||||
|
|
||||||
|
@ -266,6 +275,9 @@ public class XMLPatcher {
|
||||||
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
matchedNodes = matchedNodes.subList( searchStart, matchedNodes.size() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
matchedNodes.clear();
|
||||||
|
}
|
||||||
if ( panic && matchedNodes.isEmpty() )
|
if ( panic && matchedNodes.isEmpty() )
|
||||||
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
throw new NoSuchElementException( String.format( "<%s> was set to require results but found none (%s).", node.getName(), getPathToRoot(node) ) );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue