Fix bugs found in execStdin found in disabling basic input tests
diff --git a/src/bc/vm.c b/src/bc/vm.c
index 0c82dd9..a37728e 100644
--- a/src/bc/vm.c
+++ b/src/bc/vm.c
@@ -284,7 +284,7 @@
total_len = slen + len;
if (len == 1 && buf[0] == '"') string = !string;
- else if (len > 1) {
+ else if (len > 1 || comment) {
for (uint32_t i = 0; i < len; ++i) {
@@ -296,10 +296,13 @@
c = buf[i];
if (c == '"') string = !string;
- else if (c == '/' && notend && comment && buf[i + 1] == '*')
+ else if (c == '/' && notend && !comment && buf[i + 1] == '*') {
comment = true;
- else if (c == '*' && notend && !comment && buf[i + 1] == '/')
+ break;
+ }
+ else if (c == '*' && notend && comment && buf[i + 1] == '/') {
comment = false;
+ }
}
if (string || comment || buf[len - 2] == '\\') {