From ad1641c0dab6cdd7bac52d261bcc03d81d14cc21 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 26 Jul 2013 00:18:37 +0200 Subject: m_property: fix non-sense code Undefined behavior. --- core/m_property.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/m_property.c b/core/m_property.c index 904148e6ee..e908da623b 100644 --- a/core/m_property.c +++ b/core/m_property.c @@ -87,13 +87,14 @@ static int do_action(const m_option_t *prop_list, const char *name, { const char *sep; const m_option_t *prop; + struct m_property_action_arg ka; if ((sep = strchr(name, '/')) && sep[1]) { int len = sep - name; char base[len + 1]; memcpy(base, name, len); base[len] = 0; prop = m_option_list_find(prop_list, base); - struct m_property_action_arg ka = { + ka = (struct m_property_action_arg) { .key = sep + 1, .action = action, .arg = arg, -- cgit v1.2.3