Browse Source

The ACTION's parent can be VAR

git-svn-id: https://klish.googlecode.com/svn/trunk@428 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 13 years ago
parent
commit
fb20e844d0
1 changed files with 7 additions and 1 deletions
  1. 7 1
      clish/shell/shell_tinyxml.cpp

+ 7 - 1
clish/shell/shell_tinyxml.cpp

@@ -470,7 +470,13 @@ process_param(clish_shell_t * shell, TiXmlElement * element, void *parent)
 static void
 process_action(clish_shell_t * shell, TiXmlElement * element, void *parent)
 {
-	clish_command_t *cmd = (clish_command_t *) parent;
+	clish_command_t *cmd = NULL;
+	clish_var_t *var = NULL;
+
+	if (!lub_string_nocasecmp(element->Parent()->Value(), "VAR"))
+		var = (clish_var_t *)parent;
+	else
+		cmd = (clish_command_t *)parent;
 
 	if (cmd) {
 		// read the following text element