--- compress42.c~ 2006-07-25 10:44:51.129858888 -0600 +++ compress42.c 2006-07-25 10:44:51.129858888 -0600 @@ -1723,7 +1723,7 @@ code = oldcode; } - while ((cmp_code_int)code >= (cmp_code_int)256) + while ((cmp_code_int)code >= (cmp_code_int)256 && stackp >= htabof(0)) { /* Generate output characters in reverse order */ *--stackp = tab_suffixof(code); code = tab_prefixof(code);