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

Denys Vlasenko vda.linux at googlemail.com
Thu Dec 13 16:46:26 UTC 2018


commit: https://git.busybox.net/busybox/commit/?id=335b4efd2f5627b52290e0a6320bab4e6b3aa568
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 miscutils/bc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/miscutils/bc.c b/miscutils/bc.c
index dc9a7da8e..a78cd591a 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -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 == '[')


More information about the busybox-cvs mailing list