From 766f67250f01dc5458093c31ec0d2ec09cad65a2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 13 Dec 2018 17:23:24 +0100 Subject: bc: fix comment handling function old new delta bc_vm_run 514 513 -1 Signed-off-by: Denys Vlasenko --- miscutils/bc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'miscutils/bc.c') 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) string++; if (c == '/' && *string == '*') { comment = true; - break; + string++; + continue; } - if (c == '*' && *string == '/') + if (c == '*' && *string == '/') { comment = false; + string++; + } } if (str || comment || string[-2] == '\\') { bc_vec_concat(&buffer, buf.v); -- cgit v1.2.3