From fd102302a699622d83cccd2f18d62b1e3bf892c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20L=2E=20=C5=A0ijanec?= Date: Sun, 3 May 2020 23:04:07 +0200 Subject: move variable fix --- src/bvrcommands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bvrcommands.c b/src/bvrcommands.c index 54f6bda..bc5eed3 100644 --- a/src/bvrcommands.c +++ b/src/bvrcommands.c @@ -67,10 +67,10 @@ int bvr_handle_move(FILE * input, FILE * output) { int i = 0; 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) { - item[++i] = input_char; + item[i++] = input_char; input_char = fgetc(input); } - item[++i] = '\0'; + item[i++] = '\0'; i = 0; input_char = bvr_var_skip_separator_chars(input); while(input_char != ' ' && input_char != CLOSING_COMMAND_TAG_CHAR_1 && input_char != ',' && input_char != ';' && input_char != EOF && -- cgit v1.2.3