From a9224ebee3b6458dee42d76ec76b1a704e206107 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 13 Sep 2024 01:31:49 +0200 Subject: 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. --- src/goto-commands.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/goto-commands.c') 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; -- cgit v1.2.3