From e829c77297be749f642174d346cf5a1a78809387 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 24 May 2026 20:14:51 +0100 Subject: [PATCH] file: update fx_array usage --- bshell/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bshell/file.c b/bshell/file.c index 0884964..b115da2 100644 --- a/bshell/file.c +++ b/bshell/file.c @@ -27,13 +27,15 @@ static enum bshell_status get_row( size_t *nr_read) { struct file *f = (struct file *)src; - size_t nr_rows = fx_array_size(f->f_lines); + size_t nr_rows = fx_array_get_size(f->f_lines); if (row > nr_rows) { return BSHELL_ERR_EOF; } - fx_string *line = fx_array_at(f->f_lines, row - 1); + fx_value *line_v = fx_array_get_ref(f->f_lines, row - 1); + fx_string *line = NULL; + fx_value_get_object(line_v, &line); const char *line_str = fx_string_get_cstr(line); size_t line_len = fx_string_get_size(line, FX_STRLEN_NORMAL);