From: nishi Date: Tue, 30 Apr 2024 01:58:34 +0000 (+0000) Subject: maybe ignore null X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=7de48d13ccf820ba93db10d1eaee506ae832310b;p=serenade.git maybe ignore null git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@83 0f02c867-ac3d-714e-8a88-971ba1f6efcf --- 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;