Skip to content

Commit

Permalink
Fix bug with & at the end of string
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaykul committed Jul 18, 2023
1 parent ef515d7 commit 5d421d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Assembly/Entities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ public static string Decode(string value)
int end = 0, start = 0;
while((start = value.IndexOf('&', end)) != -1)
{
string result;
output.Append(value.Substring(end, start - end));
// if it's at the end, we're done here
if (start == value.Length - 1)
{
break;
}
string result;
output.Append(value.Substring(end, start - end));

// We found a '&'. Now look for the next ';' or '&'.
// If we find another '&' then this is not an entity, but that one might be
Expand Down

0 comments on commit 5d421d5

Please sign in to comment.