From d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20L=2E=20=C5=A0ijanec?= Date: Sun, 3 May 2020 23:02:59 +0200 Subject: funtions with variables now include move --- src/bvrcommands.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/bvrcommands.c b/src/bvrcommands.c index 5930222..54f6bda 100644 --- a/src/bvrcommands.c +++ b/src/bvrcommands.c @@ -73,13 +73,12 @@ int bvr_handle_move(FILE * input, FILE * output) { item[++i] = '\0'; i = 0; input_char = bvr_var_skip_separator_chars(input); - value[i] = input_char; while(input_char != ' ' && input_char != CLOSING_COMMAND_TAG_CHAR_1 && input_char != ',' && input_char != ';' && input_char != EOF && input_char != '\0' && input_char != '\n' && i < BVR_MAX_VARIABLE_SIZE) { - value[++i] = input_char; + value[i++] = input_char; input_char = fgetc(input); } - value[++i] = '\0'; + value[i++] = '\0'; return bvr_var_mv(item, value); fflush(output); return SUCCESS; -- cgit v1.2.3