C2022-001 fixed index out of range when updating RO values

C2022-001 pass in Otherxxx parent/child information to get correct child RO value
C2022-001 new logic to get parent (default) RO value.
This commit is contained in:
2022-01-21 14:35:17 +00:00
parent 8a2b19521d
commit b10d66fc53
3 changed files with 14 additions and 3 deletions

View File

@@ -397,7 +397,7 @@ namespace VEPROMS.CSLA.Library
}
string defPrefix = tText.Substring(start - 3, 3);
if (defPrefix != @"\v ") throw new Exception(string.Format("rtf string {0} does not match expected format", defPrefix));
string txt = tText.Substring(lastIndex, start - lastIndex - 3);
string txt = tText.Substring(lastIndex, start - (lastIndex - 3));
int lastSlash = txt.LastIndexOf(@"\");
int lastSpace = txt.LastIndexOf(" ");
int lastCR = txt.LastIndexOf("\r");