From cfb0d6ebeaf7742f28a7578bd29965a1b1b8dc5a Mon Sep 17 00:00:00 2001 From: Xiaohan Chen <26203721+CovMat@users.noreply.github.com> Date: Sun, 27 Jul 2025 15:17:08 +0900 Subject: [PATCH] Update gmt_init.c It may be unsafe for "3" in some systems --- src/gmt_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gmt_init.c b/src/gmt_init.c index b5539f1bb81..1f877e8b6d6 100644 --- a/src/gmt_init.c +++ b/src/gmt_init.c @@ -12225,7 +12225,7 @@ unsigned int gmtlib_setparameter (struct GMT_CTRL *GMT, const char *keyword, cha case GMTCASE_GMT_AUTO_DOWNLOAD: /* Deprecated as of 6.2: we only use GMT_DATA_UPDATE_INTERVAL to control this feature now, but silently process for backwards compatibility */ - if (!strncmp (lower_value, "on", 3)) + if (!strncmp (lower_value, "on", 2)) GMT->current.setting.auto_download = GMT_YES_DOWNLOAD; else if (!strncmp (lower_value, "off", 3)) GMT->current.setting.auto_download = GMT_NO_DOWNLOAD;