From 6268755d6e5ea0a23ca1be10e346431898fdc072 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 15 Oct 2024 13:19:05 +0800 Subject: [PATCH] GMT_Put_Vector: Fix a bug when passing longitude/latitude strings --- src/gmt_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gmt_api.c b/src/gmt_api.c index 011079edf86..53a37be13b9 100644 --- a/src/gmt_api.c +++ b/src/gmt_api.c @@ -15579,9 +15579,9 @@ int GMT_Put_Vector (void *V_API, struct GMT_VECTOR *V, unsigned int col, unsigne } if (special_type == GMT_DATETIME || gmtlib_maybe_abstime (API->GMT, text)) /* Honor backwards compatibility for GMT_DATETIME */ L_type = GMT_IS_ABSTIME; - else if (strchr ("WE", text[L])) + else if (strchr ("WE", text[L-1])) L_type = GMT_IS_LON; - else if (strchr ("SN", text[L])) + else if (strchr ("SN", text[L-1])) L_type = GMT_IS_LAT; else if (strchr (text, ':')) L_type = GMT_IS_GEO;