fix metaparser bug

This commit is contained in:
Michael Oborne 2012-04-30 21:54:27 +08:00
parent 432b11e1f4
commit 2632fc0c06

View File

@ -208,7 +208,7 @@ namespace ArdupilotMega.Utilities
{ {
// This is the end index for a substring to search for parameter attributes // This is the end index for a substring to search for parameter attributes
// If we are on the last index in our collection, we will search to the end of the file // If we are on the last index in our collection, we will search to the end of the file
var stopMetaIdx = (x == metaIndicies.Count - 1) ? subStringToSearch.Length : metaIndicies[x + 1]; var stopMetaIdx = (x == metaIndicies.Count - 1) ? subStringToSearch.Length : metaIndicies[x + 1] + 1;
// This meta param string // This meta param string
var metaString = subStringToSearch.Substring(metaIndicies[x], (stopMetaIdx - metaIndicies[x])); var metaString = subStringToSearch.Substring(metaIndicies[x], (stopMetaIdx - metaIndicies[x]));