summaryrefslogtreecommitdiff
path: root/plugins/AdvaImg/src/FreeImage/PluginGIF.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-13 20:28:24 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-13 20:28:24 +0000
commitd2d798d0f11abcbf141db69869e76e8d123ec1eb (patch)
treecee8645964030b4b80231952885911f724850d12 /plugins/AdvaImg/src/FreeImage/PluginGIF.cpp
parenta400ebf572dcad9b43d1b641b1742814f8b5e8a5 (diff)
FreeImage updated to 3.16
git-svn-id: http://svn.miranda-ng.org/main/trunk@11379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AdvaImg/src/FreeImage/PluginGIF.cpp')
-rw-r--r--plugins/AdvaImg/src/FreeImage/PluginGIF.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/AdvaImg/src/FreeImage/PluginGIF.cpp b/plugins/AdvaImg/src/FreeImage/PluginGIF.cpp
index e8d84afac4..87c0185865 100644
--- a/plugins/AdvaImg/src/FreeImage/PluginGIF.cpp
+++ b/plugins/AdvaImg/src/FreeImage/PluginGIF.cpp
@@ -376,7 +376,7 @@ bool StringTable::Decompress(BYTE *buf, int *len)
m_partial >>= m_codeSize;
m_partialSize -= m_codeSize;
- if( code > m_nextCode || (m_nextCode == MAX_LZW_CODE && code != m_clearCode) || code == m_endCode ) {
+ if( code > m_nextCode || /*(m_nextCode == MAX_LZW_CODE && code != m_clearCode) || */code == m_endCode ) {
m_done = true;
*len = (int)(bufpos - buf);
return true;
@@ -387,7 +387,7 @@ bool StringTable::Decompress(BYTE *buf, int *len)
}
//add new string to string table, if not the first pass since a clear code
- if( m_oldCode != MAX_LZW_CODE ) {
+ if( m_oldCode != MAX_LZW_CODE && m_nextCode < MAX_LZW_CODE) {
m_strings[m_nextCode] = m_strings[m_oldCode] + m_strings[code == m_nextCode ? m_oldCode : code][0];
}