]> Nishi Git Mirror - serenade.git/commitdiff
maybe ignore null
authornishi <nishi@0f02c867-ac3d-714e-8a88-971ba1f6efcf>
Tue, 30 Apr 2024 01:58:34 +0000 (01:58 +0000)
committernishi <nishi@0f02c867-ac3d-714e-8a88-971ba1f6efcf>
Tue, 30 Apr 2024 01:58:34 +0000 (01:58 +0000)
git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@83 0f02c867-ac3d-714e-8a88-971ba1f6efcf

Serenade/interpreter.c

index 460586d3256b318f4e7c886c106d5e98ea97592e..7850b7d047f7ec88a1a56a1f250d809a0e372b5b 100644 (file)
@@ -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;