about summary refs log tree commit diff
path: root/src/engine/shared/huffman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/shared/huffman.cpp')
-rw-r--r--src/engine/shared/huffman.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/shared/huffman.cpp b/src/engine/shared/huffman.cpp
index 8b0c1cd0..bb7aeaa8 100644
--- a/src/engine/shared/huffman.cpp
+++ b/src/engine/shared/huffman.cpp
@@ -7,7 +7,7 @@ struct CHuffmanConstructNode
  	int m_Frequency;
 };
 
-void CHuffman::Setbits_r(CNode *pNode, int Bits, int Depth)
+void CHuffman::Setbits_r(CNode *pNode, int Bits, unsigned Depth)
 {
 	if(pNode->m_aLeafs[1] != 0xffff)
 		Setbits_r(&m_aNodes[pNode->m_aLeafs[1]], Bits|(1<<Depth), Depth+1);
@@ -52,7 +52,7 @@ void CHuffman::ConstructTree(const unsigned *pFrequencies)
 	// add the symbols
 	for(int i = 0; i < HUFFMAN_MAX_SYMBOLS; i++)
 	{
-		m_aNodes[i].m_NumBits = -1;
+		m_aNodes[i].m_NumBits = 0xFFFFFFFF;
 		m_aNodes[i].m_Symbol = i;
 		m_aNodes[i].m_aLeafs[0] = -1;
 		m_aNodes[i].m_aLeafs[1] = -1;