Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Nov 1, 2024
1 parent 038df2f commit d83a395
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wgrib2/unpk.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ int unpk_grib(unsigned char **sec, float *data) {
fatal_error("unpk: png decode allocation error", "");

//i = (int) dec_png_clone(sec[7]+5, &width, &height, (unsigned char *) c, &nbits, ndata);
i = (int) g2c_dec_png(sec[7]+5, (int *)&width, (int *)&height, (unsigned char *) c);
i = (int) g2c_dec_png(sec[7]+5, &width, &height, (unsigned char *) c);
if (i) fatal_error_i("unpk: png decode error %d",i);
mask_pointer = (bitmap_flag == 255) ? NULL : sec[6] + 6;

// check sizes

if (mask_pointer == NULL) {
if (ndata != width*height)
fatal_error_i("png size mismatch w*h=%d", width*height);
fatal_error_i("png size mismatch w*h=%d", ndata); //width*height);
}
else {
if (ndata != width*height + missing_points(mask_pointer, GB2_Sec3_npts(sec)) )
Expand Down

0 comments on commit d83a395

Please sign in to comment.