aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-23 23:52:08 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-10-24 01:35:10 +0300
commit94ee99d3d50fdf9c7a67b62c0c2084021f2154fa (patch)
tree58115cc7e8207dbcfcce9e4fee9146846efce1b1
parent4f9747cca0031758a948ed650b7b68d44e373176 (diff)
downloadsciteco-94ee99d3d50fdf9c7a67b62c0c2084021f2154fa.tar.gz
fixed <U> command: -Uq is equivalent to -1Uq again.
* This has been broken since the C conversion (432ad24e382681f1c13b07e8486e91063dd96e2e). * Fixes getopt.tes, although no script actually checked the contents of the getopt.X numeric Q-Registers. grosciteco.tes also made use of this. It's unclear what has consequently been broken. * NOTE: TECOC does not seem to support -Uq - this is a SciTECO extension.
-rw-r--r--src/qreg-commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qreg-commands.c b/src/qreg-commands.c
index b505b33..1e1649b 100644
--- a/src/qreg-commands.c
+++ b/src/qreg-commands.c
@@ -518,7 +518,7 @@ teco_state_setqreginteger_got_register(teco_machine_main_t *ctx, teco_qreg_t *qr
return NULL;
if (teco_expressions_args() || teco_num_sign < 0) {
teco_int_t v;
- if (!teco_expressions_pop_num_calc(&v, 0, error) ||
+ if (!teco_expressions_pop_num_calc(&v, teco_num_sign, error) ||
!qreg->vtable->undo_set_integer(qreg, error) ||
!qreg->vtable->set_integer(qreg, v, error))
return NULL;