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

More weirdness uncovered by Coverity.

To be fair, this is all weird.
parent 1d29b21d
Branches
Tags
No related merge requests found
......@@ -450,7 +450,7 @@ static void lzh_update(lzh_t* lzh, short int c)
/* swap nodes to keep the tree freq-ordered */
if (((unsigned)k) > ((unsigned)lzh->freq[l = c + 1])) {
while (k > lzh->freq[++l]);
while (l < (sizeof(lzh->freq) / sizeof(lzh->freq[0])) && k > lzh->freq[++l]);
l--;
lzh->freq[c] = lzh->freq[l];
lzh->freq[l] = k;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment