aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-13 17:23:24 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-13 17:43:23 +0100
commit766f67250f01dc5458093c31ec0d2ec09cad65a2 (patch)
tree0203b6b381d35d5784acf8bb9eccf07dc5958396 /miscutils
parent7dc0a51286b7898fcc17033dce1f1856e78494b4 (diff)
downloadbusybox-w32-766f67250f01dc5458093c31ec0d2ec09cad65a2.tar.gz
busybox-w32-766f67250f01dc5458093c31ec0d2ec09cad65a2.tar.bz2
busybox-w32-766f67250f01dc5458093c31ec0d2ec09cad65a2.zip
bc: fix comment handling
function old new delta bc_vm_run 514 513 -1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/bc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 9c7e69fc1..dc9a7da8e 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -7088,10 +7088,13 @@ static BC_STATUS zbc_vm_stdin(void)
7088 string++; 7088 string++;
7089 if (c == '/' && *string == '*') { 7089 if (c == '/' && *string == '*') {
7090 comment = true; 7090 comment = true;
7091 break; 7091 string++;
7092 continue;
7092 } 7093 }
7093 if (c == '*' && *string == '/') 7094 if (c == '*' && *string == '/') {
7094 comment = false; 7095 comment = false;
7096 string++;
7097 }
7095 } 7098 }
7096 if (str || comment || string[-2] == '\\') { 7099 if (str || comment || string[-2] == '\\') {
7097 bc_vec_concat(&buffer, buf.v); 7100 bc_vec_concat(&buffer, buf.v);