diff --git a/examples/compiled/non_zero.sh b/examples/compiled/non_zero.sh index e1abe4c..2a042b1 100755 --- a/examples/compiled/non_zero.sh +++ b/examples/compiled/non_zero.sh @@ -12,7 +12,7 @@ _main() { while _getchar __t1; [ $__NEWLINE__ != $__t1 ]; do : done - [ $n = $__0__ ] || [ $((!((n >= __0__) && (n <= __9__)))) != 0 ]|| break + [ $n = $__0__ ] || [ $((!((n >= __0__) && (n <= __9__)))) != 0 ] || break done printf "You entered " printf \\$((n/64))$((n/8%8))$((n%8)) diff --git a/sh.c b/sh.c index ec11f53..c7b6d62 100644 --- a/sh.c +++ b/sh.c @@ -1994,7 +1994,7 @@ bool comp_statement(ast node, STMT_CTX stmt_ctx) { return comp_loop(wrap_str_lit(":"), get_child(node, 0), 0, // No loop end statement - string_concat(comp_rvalue(get_child(node, 1), RVALUE_CTX_TEST), wrap_str_lit("|| break")), + string_concat(comp_rvalue(get_child(node, 1), RVALUE_CTX_TEST), wrap_str_lit(" || break")), stmt_ctx ); } else if (op == FOR_KW) {