Skip to content

Commit

Permalink
Fix bad parsing in option -D (it was potentially checking -F contents…
Browse files Browse the repository at this point in the history
…). (#8187)

Fixes #8186
  • Loading branch information
joa-quim authored Dec 12, 2023
1 parent 94c51b5 commit 4ee805e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/psimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ static int parse (struct GMT_CTRL *GMT, struct PSIMAGE_CTRL *Ctrl, struct GMT_OP
break;
case 'D':
n_errors += gmt_M_repeated_module_option (API, Ctrl->D.active);
strncpy(string, opt->arg, GMT_LEN256 - 1);
p = (string[0]) ? string : opt->arg; /* If -C was used the string is set */
if ((Ctrl->D.refpoint = gmt_get_refpoint (GMT, p, 'D')) == NULL) { /* Failed basic parsing */
GMT_Report (API, GMT_MSG_ERROR, "Option -D: Basic parsing of reference point in %s failed\n", opt->arg);
Expand Down

0 comments on commit 4ee805e

Please sign in to comment.