From 5dbddd127399126eb7c1915dab35bbb14139b45f Mon Sep 17 00:00:00 2001 From: morkt Date: Sat, 29 Oct 2016 05:32:57 +0400 Subject: [PATCH] (PsbReader): fixed deserialization. --- ArcFormats/Emote/ArcPSB.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArcFormats/Emote/ArcPSB.cs b/ArcFormats/Emote/ArcPSB.cs index c9d11a60..6327f216 100644 --- a/ArcFormats/Emote/ArcPSB.cs +++ b/ArcFormats/Emote/ArcPSB.cs @@ -386,7 +386,7 @@ namespace GameRes.Formats.Emote foreach (var item in lookup) { int first = GetArrayElem (nm1, item.Key); - for (int i = 0; i < 256; ++i) + for (int i = 0; i < 256 && i + first < nm2.Count; ++i) { if (GetArrayElem (nm2, i + first) == item.Key) {