X-Git-Url: https://plomlompom.com/repos/feed.xml?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fcommand_db.c;fp=src%2Fclient%2Fcommand_db.c;h=9e99f5e6e93fb5aeb43b2910865999f27ed3bfc9;hb=a3c8dd9de99c7c77ad8218c3767abd4475c3dab6;hp=ef84c493fb42f1f04c886d323c61d0bfafd67388;hpb=39754116c2ce1d6aa1f4cb6c931a33132ef46bfe;p=plomrogue diff --git a/src/client/command_db.c b/src/client/command_db.c index ef84c49..9e99f5e 100644 --- a/src/client/command_db.c +++ b/src/client/command_db.c @@ -7,7 +7,8 @@ #include /* free() */ #include /* memset(), strcmp(), strdup() */ #include "../common/parse_file.h" /* EDIT_STARTED, parse_file(), set_val(), - * token_from_line(), err_line() + * token_from_line(), err_line(), + * finalize_by_readyflag() */ #include "../common/try_malloc.h" /* try_malloc() */ #include "array_append.h" /* array_append() */ @@ -48,8 +49,7 @@ static void tokens_into_entries(char * token0, char * token1) static struct Command * cmd = NULL; if (!token0 || !strcmp(token0, str_cmd)) { - char * err_fin = "Last definition block not finished yet."; - err_line((cmd_flags & READY_CMD) ^ READY_CMD, err_fin); + finalize_by_readyflag(&cmd_flags, READY_CMD); if (cmd) { array_append(world.commandDB.n, sizeof(struct Command),