From 91d8dd0bcd04418a1c927886371318309467fda4 Mon Sep 17 00:00:00 2001 From: xolatile Date: Wed, 1 Nov 2023 09:06:02 -0400 Subject: [PATCH] Minor updates... --- xtandard.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xtandard.c b/xtandard.c index df83032..d86668c 100644 --- a/xtandard.c +++ b/xtandard.c @@ -222,7 +222,7 @@ void * record (void) { buffer [offset] = '\0'; - in (& buffer [offset], sizeof (* buffer)); + in (& buffer [offset], (int) sizeof (* buffer)); ++offset; } while (buffer [offset - 1] != '\0'); @@ -469,11 +469,11 @@ void file_list_insert_character (char character, int position) { int offset; ++file_list_size [file_list_active]; -/* - if (file_list_size [file_list_active] <= string_length (file_list_data [file_list_active])) { + + if (file_list_size [file_list_active] < string_length (file_list_data [file_list_active])) { file_list_data [file_list_active] = reallocate (file_list_data [file_list_active], file_list_size [file_list_active]); } -*/ + file_list_data [file_list_active] = reallocate (file_list_data [file_list_active], file_list_size [file_list_active]); for (offset = file_list_size [file_list_active] - 1; offset != position; --offset) { @@ -495,6 +495,8 @@ void file_list_remove_character (int position) { for (offset = position - 1; offset != file_list_size [file_list_active] - 1; ++offset) { file_list_data [file_list_active] [offset] = file_list_data [file_list_active] [offset + 1]; } + + file_list_data [file_list_active] [offset] = '\0'; } void file_list_delete (void) {