summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLode Vandevenne <lvandeve@users.noreply.github.com>2017-10-10 21:08:41 +0200
committerGitHub <noreply@github.com>2017-10-10 21:08:41 +0200
commit757e608d2a7ebebbebe1c34ca96aebefe73bd815 (patch)
treefe540a25a9c4b6ef0068203a8066aaf2c28512c8
parent8d6b3a35c3f63d2bdd1545de971803dd957e4a9b (diff)
parent796b000e5951bc1ab4818d0207be63b49c4d52ca (diff)
Merge pull request #52 from JayXon/error_code
Fix wrong error code if huffmanDecodeSymbol fail
-rw-r--r--lodepng.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lodepng.cpp b/lodepng.cpp
index ad6ed24..37b0562 100644
--- a/lodepng.cpp
+++ b/lodepng.cpp
@@ -1171,7 +1171,7 @@ static unsigned inflateHuffmanBlock(ucvector* out, const unsigned char* in, size
code_d = huffmanDecodeSymbol(in, bp, &tree_d, inbitlength);
if(code_d > 29)
{
- if(code_ll == (unsigned)(-1)) /*huffmanDecodeSymbol returns (unsigned)(-1) in case of error*/
+ if(code_d == (unsigned)(-1)) /*huffmanDecodeSymbol returns (unsigned)(-1) in case of error*/
{
/*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol
(10=no endcode, 11=wrong jump outside of tree)*/