This commit is contained in:
twinaphex 2018-04-16 08:35:10 +02:00
parent 5550f21d69
commit 04ce534e49
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View file

@ -1,2 +1 @@
*.o
*.exe

View file

@ -24,8 +24,9 @@
#ifdef _MSC_VER
#include <retro_common.h>
#if _MSC_VER >= 1900
#include <stdio.h> /* added for _vsnprintf_s and _vscprintf on VS2015 and VS2017 */
#endif
#include <stdarg.h>
#if _MSC_VER < 1800

View file

@ -294,7 +294,10 @@ enum huffman_error huffman_import_tree_huffman(struct huffman_decoder* decoder,
/* make sure we ended up with the right number */
if (curcode != decoder->numcodes)
{
delete_huffman_decoder(smallhuff);
return HUFFERR_INVALID_DATA;
}
/* assign canonical codes for all nodes based on their code lengths */
error = huffman_assign_canonical_codes(decoder);