aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/goto-commands.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-13 01:31:49 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-09-13 01:49:22 +0200
commita9224ebee3b6458dee42d76ec76b1a704e206107 (patch)
tree5582c794f37cd092a987ce8dc9ae49723d46a1a0 /src/goto-commands.c
parentc2057ebf7e2a34eccd615a7d88085e247e5b9e9f (diff)
downloadsciteco-a9224ebee3b6458dee42d76ec76b1a704e206107.tar.gz
remaining types of program counters changed to gsize/gssize
* This fixes F< to the beginning of the macro, which was broken in 73d574b71a10d4661ada20275cafde75aff6c1ba. teco_machine_main_t::macro_pc actually has to be signed as it is sometimes set to -1.
Diffstat (limited to 'src/goto-commands.c')
-rw-r--r--src/goto-commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/goto-commands.c b/src/goto-commands.c
index bf80c0b..a8a9689 100644
--- a/src/goto-commands.c
+++ b/src/goto-commands.c
@@ -61,8 +61,8 @@ teco_state_label_input(teco_machine_main_t *ctx, gunichar chr, GError **error)
* on rubout.
* Otherwise, the label will be removed (PC == -1).
*/
- gint existing_pc = teco_goto_table_set(&ctx->goto_table, ctx->goto_label.data,
- ctx->goto_label.len, ctx->macro_pc);
+ gssize existing_pc = teco_goto_table_set(&ctx->goto_table, ctx->goto_label.data,
+ ctx->goto_label.len, ctx->macro_pc);
if (ctx->parent.must_undo)
teco_goto_table_undo_set(&ctx->goto_table, ctx->goto_label.data, ctx->goto_label.len, existing_pc);
@@ -119,7 +119,7 @@ teco_state_goto_done(teco_machine_main_t *ctx, const teco_string_t *str, GError
}
if (value == 0) {
- gint pc = teco_goto_table_find(&ctx->goto_table, label.data, label.len);
+ gssize pc = teco_goto_table_find(&ctx->goto_table, label.data, label.len);
if (pc >= 0) {
ctx->macro_pc = pc;