summaryrefslogtreecommitdiff
path: root/ui.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-22 19:17:19 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-22 19:17:19 -0500
commitf2edda528a3babe16d9da48580bdcb696e5fa664 (patch)
tree8e54df107de0bc3b87d147bb973e51eef76b769b /ui.c
parent0f0a03b518ff6dbb61814896e5efc9b5878904e4 (diff)
fixed memory leaks
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui.c b/ui.c
index 57b6177..5d31d29 100644
--- a/ui.c
+++ b/ui.c
@@ -61,8 +61,8 @@ void file_selector_cd(Ted *ted, FileSelector *fs, char const *path) {
--path_len;
// add path separator to end
- arr_append_str(fs->cwd, PATH_SEPARATOR_STR);
- arr_append_strn(fs->cwd, path, path_len);
+ arrcstr_append_str(fs->cwd, PATH_SEPARATOR_STR);
+ arrcstr_append_strn(fs->cwd, path, path_len);
// clear search term
buffer_clear(&ted->line_buffer);
@@ -74,7 +74,7 @@ static char *file_selector_update(Ted *ted, FileSelector *fs) {
String32 search_term32 = buffer_get_line(&ted->line_buffer, 0);
if (!fs->cwd) {
// set the file selector's directory to our current directory.
- arr_append_str(fs->cwd, ted->cwd);
+ arrcstr_append_str(fs->cwd, ted->cwd);
}
char *search_term = search_term32.len ? str32_to_utf8_cstr(search_term32) : NULL;