Skip to content

Commit

Permalink
Avoid adding duplicated inventory notes to the dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarti856 committed Aug 24, 2023
1 parent 94dab05 commit bb7b381
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Reader/svReader_PC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ private void ReadNotes(BinaryReader binReader, Dictionary<uint, uint> destList,
uint desc_hashcode = binReader.ReadUInt32();
if (title_hashcode != 0 && desc_hashcode != 0)
{
destList.Add(title_hashcode, desc_hashcode);
if (!destList.ContainsKey(title_hashcode))
{
destList.Add(title_hashcode, desc_hashcode);
}
}
}
activeNotes = binReader.ReadUInt32();
Expand Down

0 comments on commit bb7b381

Please sign in to comment.