Refactored; added state property to command struct to notate where in the lifecycle...
[open-adventure.git] / misc.c
diff --git a/misc.c b/misc.c
index 6132b92150bd36756d56bdbab8bd1a02d5fad41d..6db040a1fb3c0f755b3a741d5d9646845df698e5 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -511,6 +511,7 @@ static void tokenize(char* raw, command_t *cmd)
     /* populate command with parsed vocabulary metadata */
     get_vocab_metadata(cmd->word[0].raw, &(cmd->word[0].id), &(cmd->word[0].type));
     get_vocab_metadata(cmd->word[1].raw, &(cmd->word[1].id), &(cmd->word[1].type));
+    cmd->state = TOKENIZED;
 }
 
 bool get_command_input(command_t *command)
@@ -551,6 +552,7 @@ bool get_command_input(command_t *command)
            command->word[1].id);
 #endif
 
+    command->state = GIVEN;
     return true;
 }