aboutgitcodelistschat:MatrixIRC
path: root/cooker/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'cooker/parse.c')
-rw-r--r--cooker/parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cooker/parse.c b/cooker/parse.c
index 5d5cab3..8d0c20d 100644
--- a/cooker/parse.c
+++ b/cooker/parse.c
@@ -201,14 +201,14 @@ struct rule_parser {
static union value value_get_set(struct num *desc, JSON_Array *set)
{
+ union value n = { 0 };
struct num *tmp;
- union value n;
unsigned i;
for (i = 0; i < json_array_get_count(set); i++) {
for (tmp = desc; tmp->name; tmp++) {
if (!strcmp(tmp->name, json_array_get_string(set, i))) {
- n.v_num |= desc->value;
+ n.v_num |= tmp->value;
break;
}
}
@@ -364,6 +364,8 @@ static void parse_block(struct gluten_ctx *g, JSON_Object *block)
unsigned i;
memset(g->selected_arg, 0, sizeof(g->selected_arg));
+ memset(g->match_dst, 0, sizeof(g->match_dst));
+ memset(g->call_src, 0, sizeof(g->call_src));
memset(g->tags, 0, sizeof(g->tags));
g->lr = g->ip;