From 373034f504159fe40e3a7c2fff2fa484ba8312c6 Mon Sep 17 00:00:00 2001 From: Joaquim Date: Fri, 22 Nov 2024 21:38:19 +0000 Subject: [PATCH] Fix the off-1 bur in -M & -L options parsing. (#8631) Fixes #8630 --- src/segy/segy2grd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/segy/segy2grd.c b/src/segy/segy2grd.c index e4400e13ecc..b92785bdd04 100644 --- a/src/segy/segy2grd.c +++ b/src/segy/segy2grd.c @@ -198,11 +198,11 @@ static int parse (struct GMT_CTRL *GMT, struct SEGY2GRD_CTRL *Ctrl, struct GMT_O break; case 'L': n_errors += gmt_M_repeated_module_option (API, Ctrl->L.active); - n_errors += gmt_get_required_int (GMT, &opt->arg[1], opt->option, 0, &Ctrl->L.value); + n_errors += gmt_get_required_int (GMT, opt->arg, opt->option, 0, &Ctrl->L.value); break; case 'M': n_errors += gmt_M_repeated_module_option (API, Ctrl->M.active); - n_errors += gmt_get_required_uint (GMT, &opt->arg[1], opt->option, 0, &Ctrl->M.value); + n_errors += gmt_get_required_uint (GMT, opt->arg, opt->option, 0, &Ctrl->M.value); break; case 'N': /* Deprecated 7.29.2021 PW, use -di */ if (gmt_M_compat_check (GMT, 6)) { /* Honor old -N option */