commit a88052a78afc6e001ad7b428f040da823fb42ea9
parent b80211d2ad3d3d95fd618a6556738fb57430d9da
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 23 May 2024 12:33:30 +0200
Fix of TRAD_PROG and SPHERICAL_SOURCE_PROG parsing
If any, the first argument submitted when creating data for the
programmable property was the PROG_PARAMS keyword, not the first
effective argument following this keyword.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/stardis-parsing.c b/src/stardis-parsing.c
@@ -2105,7 +2105,7 @@ process_radiative_prog(struct stardis* stardis, wordexp_t* pwordexp)
lib_name = arg;
if(idx < pwordexp->we_wordc
- && strcasecmp(pwordexp->we_wordv[idx], "PROG_PARAMS")) {
+ && strcasecmp(pwordexp->we_wordv[idx++], "PROG_PARAMS")) {
logger_print(stardis->logger, LOG_ERROR,
"Expecting PROG_PARAMS keyword while parsing `%s'.\n",
pwordexp->we_wordv[idx]);
@@ -2258,7 +2258,7 @@ process_spherical_source_prog(struct stardis* stardis, wordexp_t* pwordexp)
lib_name = arg;
if(idx < pwordexp->we_wordc
- && strcasecmp(pwordexp->we_wordv[idx], "PROG_PARAMS")) {
+ && strcasecmp(pwordexp->we_wordv[idx++], "PROG_PARAMS")) {
logger_print(stardis->logger, LOG_ERROR,
"Expecting PROG_PARAMS keyword while parsing `%s'.\n",
pwordexp->we_wordv[idx]);