From 51bfbed1d8f8e2a2c27bc37850865699b0e727f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20L=2E=20=C5=A0ijanec?= Date: Sun, 3 May 2020 21:05:34 +0200 Subject: now unquoted variables allow spaces, risky ... --- a.out | Bin 17000 -> 17000 bytes src/bvrcommands.c | 2 +- test/tape-test.bvr | 2 ++ tmp/output.htm | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/a.out b/a.out index c55bdd4..3ed79d7 100755 Binary files a/a.out and b/a.out differ diff --git a/src/bvrcommands.c b/src/bvrcommands.c index 2e0761b..5930222 100644 --- a/src/bvrcommands.c +++ b/src/bvrcommands.c @@ -36,7 +36,7 @@ int bvr_handle_set(FILE * input, FILE * output) { 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 && + while(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; input_char = fgetc(input); diff --git a/test/tape-test.bvr b/test/tape-test.bvr index f91ceca..e144aa4 100644 --- a/test/tape-test.bvr +++ b/test/tape-test.bvr @@ -7,6 +7,8 @@ <@?s ab 12@> <@?g ab@> <@?g ab@> +<@?s temp Ime mi je Anton Luka@> +<@?g temp@> # to je komentar in se ne rendera <@?1 post_author@> <@?2 image_caption This is an example image.@> diff --git a/tmp/output.htm b/tmp/output.htm index 2dfc960..1a48d4b 100644 --- a/tmp/output.htm +++ b/tmp/output.htm @@ -7,6 +7,8 @@ 12 12 + +Ime mi je Anton Luka bVerbose unknown command 1 -- cgit v1.2.3