From c4d91026150e21d234beda9d72adcec33c562402 Mon Sep 17 00:00:00 2001 From: Shaun Inman Date: Mon, 6 Mar 2023 21:06:54 -0500 Subject: [PATCH] only set, don't unset option lock --- src/minarch/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/minarch/main.c b/src/minarch/main.c index add83af..969b109 100644 --- a/src/minarch/main.c +++ b/src/minarch/main.c @@ -823,7 +823,7 @@ static struct Config { static int Config_getValue(char* cfg, const char* key, char* out_value, int* lock) { char* tmp = cfg; while ((tmp = strstr(tmp, key))) { - if (lock!=NULL) *lock = (tmp>cfg && *(tmp-1)=='-'); // prefixed with a `-` means lock + if (lock!=NULL && tmp>cfg && *(tmp-1)=='-') *lock = 1; // prefixed with a `-` means lock tmp += strlen(key); if (!strncmp(tmp, " = ", 3)) break; };