Skip to content

Commit

Permalink
Merge branch 'next' of https://github.com/rubberduck-vba/Rubberduck i…
Browse files Browse the repository at this point in the history
…nto InspectionBugs
  • Loading branch information
Hosch250 committed Jun 7, 2016
2 parents c43884f + 88cb6c2 commit be9c7b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Rubberduck.Parsing/VBA/RubberduckParserState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,18 @@ public void AddProject(VBProject project)
return;
}

//assign a hashcode if no helpfile is present
if (string.IsNullOrEmpty(project.HelpFile))
{
project.HelpFile = project.GetHashCode().ToString();
}

//loop until the helpfile is unique for this host session
while (_projects.Any(a => a.Key == project.HelpFile))
{
project.HelpFile = (project.GetHashCode() ^ project.HelpFile.GetHashCode()).ToString();
}

var projectId = project.HelpFile;
if (!_projects.ContainsKey(projectId))
{
Expand Down

0 comments on commit be9c7b4

Please sign in to comment.