From 834b91be7c4cf8c844253ddca1e2d74de18611df Mon Sep 17 00:00:00 2001 From: tsauerbeck Date: Sat, 23 Oct 2004 20:36:02 +0000 Subject: [PATCH] fixed arg count checking for program.action SVN revision: 11986 --- legacy/edje/src/bin/edje_cc_handlers.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/legacy/edje/src/bin/edje_cc_handlers.c b/legacy/edje/src/bin/edje_cc_handlers.c index 005bd28..7589d4e 100644 --- a/legacy/edje/src/bin/edje_cc_handlers.c +++ b/legacy/edje/src/bin/edje_cc_handlers.c @@ -1897,8 +1897,6 @@ st_collections_group_programs_program_action(void) Edje_Part_Collection *pc; Edje_Program *ep; - check_arg_count(3); - pc = evas_list_data(evas_list_last(edje_collections)); ep = evas_list_data(evas_list_last(pc->programs)); ep->action = parse_enum(0, @@ -1935,6 +1933,17 @@ st_collections_group_programs_program_action(void) ep->value = parse_float(1); ep->value2 = parse_float(2); } + + switch (ep->action) { + case EDJE_ACTION_TYPE_ACTION_STOP: + check_arg_count(1); + break; + case EDJE_ACTION_TYPE_SCRIPT: + /* FIXME: what's this? people usually just use script{}, no? */ + break; + default: + check_arg_count(3); + } } static void -- 2.7.4