Skip to content

Commit

Permalink
Avoid subscript out of range error due when aggressively sanitizing t…
Browse files Browse the repository at this point in the history
…he XML due to lngLine going beyond the end of the UBound(varLines)
  • Loading branch information
bclothier committed Apr 2, 2023
1 parent c31f9ce commit a66e4fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Version Control.accda.src/modules/modSanitize.bas
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,12 @@ Public Function SanitizeXML(strPath As String, blnReturnHash As Boolean) As Stri
If Options.AggressiveSanitize Then
Do While Not EndsWith(strTLine, "/>")
lngLine = lngLine + 1
strTLine = TrimTabs(Trim$(varLines(lngLine)))
If lngLine <= UBound(varLines) Then
strTLine = TrimTabs(Trim$(varLines(lngLine)))
Else
strTLine = vbNullString
Exit Do
End If
Loop
Else
' Keep line and continue
Expand Down

0 comments on commit a66e4fb

Please sign in to comment.