Skip to content

Commit

Permalink
Fix #8558
Browse files Browse the repository at this point in the history
Issue was that with binary input the number of requested columns did not take -Cn into account.
  • Loading branch information
joa-quim committed Jan 6, 2025
1 parent 2015787 commit 9369240
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gmtbinstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static int parse (struct GMT_CTRL *GMT, struct GMTBINSTATS_CTRL *Ctrl, struct GM
n_errors += gmt_M_check_condition (GMT, Ctrl->S.mode == -2, "Option -S: Unable to decode radius\n");
n_errors += gmt_M_check_condition (GMT, Ctrl->S.mode == -3, "Option -S: Radius is negative\n");
}
n_errors += gmt_check_binary_io (GMT, (Ctrl->W.active) ? 4 : 3);
n_errors += gmt_check_binary_io(GMT, (Ctrl->C.mode == GMTBINSTATS_COUNT) ? 2 : (Ctrl->W.active) ? 4 : 3);
if (Ctrl->W.active) { /* Update the mode if median or mode */
if (Ctrl->C.mode == GMTBINSTATS_MEDIAN) Ctrl->C.mode = GMTBINSTATS_MEDIANW;
if (Ctrl->C.mode == GMTBINSTATS_MODE) Ctrl->C.mode = GMTBINSTATS_MODEW;
Expand Down

0 comments on commit 9369240

Please sign in to comment.