From 1a75df68d6fc286437fc7e0fb6413d3ffa221094 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 3 Mar 2023 16:32:24 -0800 Subject: [PATCH] caseproto: Fix calculation in caseproto_reserve(). This reserved way too much in a lot of cases. --- src/data/caseproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/caseproto.c b/src/data/caseproto.c index 4182004e4a..f390c3f87c 100644 --- a/src/data/caseproto.c +++ b/src/data/caseproto.c @@ -86,7 +86,7 @@ caseproto_reserve (struct caseproto *proto, size_t n_widths) proto = caseproto_unshare (proto); if (n_widths > proto->allocated_widths) { - proto->allocated_widths *= MAX (proto->allocated_widths * 2, n_widths); + proto->allocated_widths = MAX (proto->allocated_widths * 2, n_widths); proto = xrealloc (proto, caseproto_size (proto->allocated_widths)); } return proto; -- 2.30.2