9467aa06316d0b1baee5ece976bb539b14b5bf85 — Simon Ser a month ago e6197b1
shell/arithm: fix assignments with operators

The variable got assigned the rvalue instead of the result of the operation.
1 files changed, 1 insertions(+), 1 deletions(-)

M shell/arithm.c
M shell/arithm.c => shell/arithm.c +1 -1
@@ 170,7 170,7 @@ *result = run_arithm_assign_op(assign->op, cur, val);
  
  	char buf[32];
- 	snprintf(buf, sizeof(buf), "%ld", val);
+ 	snprintf(buf, sizeof(buf), "%ld", *result);
  	mrsh_env_set(state, assign->name, buf, attribs);
  
  	return true;