diff options
| author | WormHeamer | 2026-01-03 03:26:56 -0500 |
|---|---|---|
| committer | WormHeamer | 2026-01-03 03:26:56 -0500 |
| commit | 42516b6e4ed6ad7bddc3076e057ff67e75bc146e (patch) | |
| tree | 99df300124b69b76144b6d763d0efc5bfece7251 | |
| parent | ce51b6a717a32fd018fa378b3d5bb990ee2fe81e (diff) | |
realloc search.s instead of malloc
| -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; |
