B2022-032 Fixed an index out of range error while building an RO return value that contains Parent/Child enabled RO fields. The code was improperly calculating the next position in the raw RO return value information.

This commit is contained in:
John Jenko 2022-03-02 16:08:15 +00:00
parent adc8617aa1
commit 38857b1fcd

View File

@ -360,7 +360,7 @@ namespace VEPROMS.CSLA.Library
nextIDX = aplString.IndexOf(",UnitIdx", offsetIdx);
if (nextIDX == -1) nextIDX = aplString.IndexOf(" /APL>");
sb.Append(aplString.Substring(offsetIdx, nextIDX - offsetIdx));
lastIndex += m.Index + m.Length;
lastIndex = m.Index + m.Length; // B2022-032 don't do a += of lastIndex the m.Index is the true position in the roval string
}
if (lastIndex < roval.Length)
sb.Append(roval.Substring(lastIndex)); // B2022-018 append any remaining text