diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -813,7 +813,7 @@ search_from_end: int read_search(void) { Str src = get_input_line(S("Search: ")); if (!src.n) return 0; - e.search.s = malloc(src.n); + e.search.s = realloc(e.search.s, src.n); if (!e.search.s) FAIL_WITH_MSG("failed to allocate search"); memcpy(e.search.s, src.s, src.n); e.search.n = src.n; |
