fixed BGI huffman decompression.

This commit is contained in:
morkt
2015-08-29 23:27:00 +04:00
parent a0ae95d1ef
commit 275652e3d7
2 changed files with 3 additions and 3 deletions

View File

@@ -232,7 +232,7 @@ namespace GameRes.Formats.BGI
int child_index = switch_flag; int child_index = switch_flag;
int depth_existed_nodes = 0; int depth_existed_nodes = 0;
while (hcode[n].Depth == depth) while (n < hcode.Length && hcode[n].Depth == depth)
{ {
var node = new HuffmanNode { IsParent = false, Code = hcode[n++].Code }; var node = new HuffmanNode { IsParent = false, Code = hcode[n++].Code };
hnodes[nodes_index[huffman_nodes_index, depth_existed_nodes]] = node; hnodes[nodes_index[huffman_nodes_index, depth_existed_nodes]] = node;

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion ("1.1.9.414")] [assembly: AssemblyVersion ("1.1.9.416")]
[assembly: AssemblyFileVersion ("1.1.9.414")] [assembly: AssemblyFileVersion ("1.1.9.416")]