Skip to content

Commit

Permalink
Fix bad size calculation in eliminate_duplicate_disjuncts
Browse files Browse the repository at this point in the history
Only triggers during generation. Fixes issue #1247
  • Loading branch information
linas committed Sep 14, 2021
1 parent a613961 commit d57493e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Version 5.10.2 (XXX 2021)
* Fix python install path.
* Fix bad size calculation in brand-new `link-generator` code #1247

Version 5.10.1 (7 Sept 2021)
* Fix perl bindings build fail. #1248
Expand Down
2 changes: 1 addition & 1 deletion link-grammar/disjunct-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ Disjunct *eliminate_duplicate_disjuncts(Disjunct *dw, bool multi_string)
{
dx->num_categories_alloced *= 2;
dx->category = realloc(dx->category,
sizeof(dx->category) * dx->num_categories_alloced);
sizeof(*(dx->category)) * dx->num_categories_alloced);
}
dassert((d->category[0].num > 0) && (d->category[0].num < 64*1024),
"Insane category %u", d->category[0].num);
Expand Down

0 comments on commit d57493e

Please sign in to comment.