← Commit list

335b4efd2

Denys Vlasenko
Denys Vlasenko
2018-12-13
SUCCESS Duration: 152s

Subject

bc: fix a thinko: dc uses [] string delimiters, bot bc!

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/bc.c+2 -2
@@ -7076,9 +7076,9 @@ static BC_STATUS zbc_vm_stdin(void)
char c = *string;
if (string != buf.v && string[-1] != '\\') {
// checking applet type is cheaper than accessing sbgn/send
- if (IS_DC) // dc: sbgn = send = '"'
+ if (IS_BC) // bc: sbgn = send = '"'
str ^= (c == '"');
- else { // bc: sbgn = '[', send = ']'
+ else { // dc: sbgn = '[', send = ']'
if (c == ']')
str -= 1;
else if (c == '[')