From 42516b6e4ed6ad7bddc3076e057ff67e75bc146e Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Sat, 3 Jan 2026 03:26:56 -0500 Subject: realloc search.s instead of malloc --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index dc9800b..729594d 100644 --- a/main.c +++ b/main.c @@ -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; -- cgit v1.2.3