jdict

command line tool for looking up terms in yomidict dictionaries
git clone anongit@rnpnr.xyz:jdict.git
Log | Files | Refs | Feed | README | LICENSE

Commit: d8ea8231cbc46777682dbe00217ce44ea25017ad
Parent: e641117a4c5d018ee71882649fb97f5a9c8db637
Author: Randy Palamar
Date:   Sat, 22 Oct 2022 19:24:47 -0600

dedup(): shrink dents before returning it

Diffstat:
Mjdict.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/jdict.c b/jdict.c @@ -92,7 +92,7 @@ dedup(DictEnt *ents, size_t *nents) */ free(ents); *nents = len; - return dents; + return xreallocarray(dents, *nents, sizeof(DictEnt)); } /* takes a token of type YOMI_ENTRY and creates a DictEnt */