From 7de48d13ccf820ba93db10d1eaee506ae832310b Mon Sep 17 00:00:00 2001 From: nishi Date: Tue, 30 Apr 2024 01:58:34 +0000 Subject: [PATCH] maybe ignore null git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@83 0f02c867-ac3d-714e-8a88-971ba1f6efcf --- Serenade/interpreter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Serenade/interpreter.c b/Serenade/interpreter.c index 460586d..7850b7d 100644 --- a/Serenade/interpreter.c +++ b/Serenade/interpreter.c @@ -237,6 +237,7 @@ struct sn_interpreter_kv* sn_set_variable(struct sn_interpreter* sn, const char* } } for(i = 0; sn->variables[i] != NULL; i++) { + if(sn->variables[i]->value == NULL) continue; if(strcmp(sn->variables[i]->key, name) == 0) { sn->variables[i]->value = gen; replaced = true; -- 2.43.0