diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-22 19:17:19 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-22 19:17:19 -0500 |
commit | f2edda528a3babe16d9da48580bdcb696e5fa664 (patch) | |
tree | 8e54df107de0bc3b87d147bb973e51eef76b769b /ui.c | |
parent | 0f0a03b518ff6dbb61814896e5efc9b5878904e4 (diff) |
fixed memory leaks
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |