diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2016-07-28 14:05:23 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2016-07-28 14:05:23 +0300 |
commit | 4b562511f67041a99b6b56204b469afac659f394 (patch) | |
tree | 51d3f159a0e9617912fd4f9f01afb362e74f87bc | |
parent | cda4f4b9026f80af50289a56706877dfa6ef41e5 (diff) | |
download | dico-4b562511f67041a99b6b56204b469afac659f394.tar.gz dico-4b562511f67041a99b6b56204b469afac659f394.tar.bz2 |
Bugfix
* modules/gcide/idxgcide.l (main): Initialize ipg_header
-rw-r--r-- | modules/gcide/idxgcide.l | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gcide/idxgcide.l b/modules/gcide/idxgcide.l index f787264..b48b11c 100644 --- a/modules/gcide/idxgcide.l +++ b/modules/gcide/idxgcide.l @@ -1,9 +1,9 @@ %top { /* This file is part of GNU Dico. - Copyright (C) 2012 Sergey Poznyakoff + Copyright (C) 2012, 2016 Sergey Poznyakoff GNU Dico is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. @@ -291,12 +291,13 @@ main(int argc, char **argv) idx_page = malloc(idx_header.ihdr_pagesize); if (!idx_page) { dico_log(L_ERR, 0, _("not enough memory")); exit(EX_UNAVAILABLE); } + idx_page->ipg_header.hdr.phdr_numentries = 0; idx_page->ipg_header.hdr.phdr_text_offset = idx_header.ihdr_pagesize / 2; idx_header.ihdr_maxpageref = idx_header.ihdr_pagesize / 2 / sizeof(struct gcide_ref); if (idx_header.ihdr_maxpageref < 1) { dico_log(L_ERR, 0, _("page size too small")); |