Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed bug in copyAffixNode (ommited the 'val' field, so the FindAffix…

…es failed).
  • Loading branch information...
commit dfc0e451e139d496af620139cbeba18e967487dd 1 parent 72fb026
Tomas Vondra authored January 04, 2012

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  src/shared_ispell.c
6  src/shared_ispell.c
@@ -544,8 +544,9 @@ AFFIX * copyAffix(AFFIX * affix) {
544 544
 	
545 545
 	if (copy->isregis) {
546 546
 		copy->reg.regis.node = copyRegisNode(copy->reg.regis.node);
547  
-	} else {
  547
+	} else if (! copy->issimple) {
548 548
 		// FIXME handle the regex_t properly (copy the strings etc)
  549
+		elog(WARNING, "skipping regex_t");
549 550
 	}
550 551
 	
551 552
 	return copy;
@@ -563,14 +564,13 @@ AffixNode * copyAffixNode(AffixNode * node) {
563 564
 	}
564 565
 	
565 566
 	copy = (AffixNode *)shalloc(offsetof(AffixNode,data) + sizeof(AffixNodeData) * node->length);
566  
-	copy->isvoid = node->isvoid;
567  
-	copy->length = node->length;
568 567
 	memcpy(copy, node, offsetof(SPNode,data) + sizeof(SPNodeData) * node->length);
569 568
 	
570 569
 	for (i = 0; i < node->length; i++) {
571 570
 		
572 571
 		copy->data[i].node = copyAffixNode(node->data[i].node);
573 572
 		
  573
+		copy->data[i].val = node->data[i].val;
574 574
 		copy->data[i].naff = node->data[i].naff;
575 575
 		copy->data[i].aff = (AFFIX**)shalloc(sizeof(AFFIX*) * node->data[i].naff);
576 576
 		memset(copy->data[i].aff, 0, sizeof(AFFIX*) * node->data[i].naff);

0 notes on commit dfc0e45

Please sign in to comment.
Something went wrong with that request. Please try again.