Skip to content
Snippets Groups Projects
Commit f6de4c83 authored by deuce's avatar deuce
Browse files

Work around unexpected GCC 4.2.1 behaviour on FreeBSD 9.1-i386 where

integer promotion which I don't seriously believe is legal make 637 > 65535.

Fixes longstanding weirdo crash on FreeBSD with LZH compressed messages.
parent 6ea69d6d
No related branches found
No related tags found
No related merge requests found
......@@ -449,7 +449,7 @@ static void lzh_update(lzh_t* lzh, short int c)
k = ++lzh->freq[c];
/* swap nodes to keep the tree freq-ordered */
if (k > lzh->freq[l = c + 1]) {
if (((unsigned)k) > ((unsigned)lzh->freq[l = c + 1])) {
while (k > lzh->freq[++l]);
l--;
lzh->freq[c] = lzh->freq[l];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment