From bb7b381cdb1ca5362fcc3548bfcafde17578060f Mon Sep 17 00:00:00 2001 From: jmarti856 Date: Fri, 25 Aug 2023 00:56:01 +0200 Subject: [PATCH] Avoid adding duplicated inventory notes to the dictionary --- Reader/svReader_PC.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Reader/svReader_PC.cs b/Reader/svReader_PC.cs index 2d04556..12154a9 100644 --- a/Reader/svReader_PC.cs +++ b/Reader/svReader_PC.cs @@ -114,7 +114,10 @@ private void ReadNotes(BinaryReader binReader, Dictionary 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();