Skip to content

Commit bb7b381

Browse files
committed
Avoid adding duplicated inventory notes to the dictionary
1 parent 94dab05 commit bb7b381

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Reader/svReader_PC.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ private void ReadNotes(BinaryReader binReader, Dictionary<uint, uint> destList,
114114
uint desc_hashcode = binReader.ReadUInt32();
115115
if (title_hashcode != 0 && desc_hashcode != 0)
116116
{
117-
destList.Add(title_hashcode, desc_hashcode);
117+
if (!destList.ContainsKey(title_hashcode))
118+
{
119+
destList.Add(title_hashcode, desc_hashcode);
120+
}
118121
}
119122
}
120123
activeNotes = binReader.ReadUInt32();

0 commit comments

Comments
 (0)