Skip to content

Commit

Permalink
More adjustment of error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Dec 15, 2021
1 parent 9a3e665 commit 497b760
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/fb/gif-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,13 @@ LZW(void)
next_code = compress_code; /* empty code table */
w = -1; /* we use -1 for "nil" */
} else {
if (c > next_code)
Fatal(fbp, "LZW code impossibly large (%x > %x, diff: %d)", c, next_code, c-next_code);
if (c > next_code) {
bu_log("LZW code impossibly large (%d > %d, diff: %d)\n", c, next_code, c-next_code);
if (fbp != FB_NULL && fb_close(fbp) == -1) {
bu_log("Error closing frame buffer\n");
}
bu_exit(EXIT_FAILURE, NULL);
}

if (c == next_code) {
/* KwKwK special case */
Expand Down Expand Up @@ -766,7 +771,7 @@ main(int argc, char **argv)
if ((i = getc(gfp)) == EOF)
Fatal(fbp, "Error reading extension function code");

bu_log("gif-fb: Extension function code %d unknown", i);
bu_log("gif-fb: Extension function code %d unknown\n", i);

while ((i = getc(gfp)) != 0) {
if (i == EOF) {
Expand Down

0 comments on commit 497b760

Please sign in to comment.