Skip to content

Commit dfc0e45

Browse files
committed
Fixed bug in copyAffixNode (ommited the 'val' field, so the FindAffixes failed).
1 parent 72fb026 commit dfc0e45

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shared_ispell.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,9 @@ AFFIX * copyAffix(AFFIX * affix) {
544544

545545
if (copy->isregis) {
546546
copy->reg.regis.node = copyRegisNode(copy->reg.regis.node);
547-
} else {
547+
} else if (! copy->issimple) {
548548
// FIXME handle the regex_t properly (copy the strings etc)
549+
elog(WARNING, "skipping regex_t");
549550
}
550551

551552
return copy;
@@ -563,14 +564,13 @@ AffixNode * copyAffixNode(AffixNode * node) {
563564
}
564565

565566
copy = (AffixNode *)shalloc(offsetof(AffixNode,data) + sizeof(AffixNodeData) * node->length);
566-
copy->isvoid = node->isvoid;
567-
copy->length = node->length;
568567
memcpy(copy, node, offsetof(SPNode,data) + sizeof(SPNodeData) * node->length);
569568

570569
for (i = 0; i < node->length; i++) {
571570

572571
copy->data[i].node = copyAffixNode(node->data[i].node);
573572

573+
copy->data[i].val = node->data[i].val;
574574
copy->data[i].naff = node->data[i].naff;
575575
copy->data[i].aff = (AFFIX**)shalloc(sizeof(AFFIX*) * node->data[i].naff);
576576
memset(copy->data[i].aff, 0, sizeof(AFFIX*) * node->data[i].naff);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy