File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -550,13 +550,12 @@ PHP_FUNCTION(enchant_broker_request_dict)
550
550
551
551
d = enchant_broker_request_dict (pbroker -> pbroker , (const char * )tag );
552
552
if (d ) {
553
+ pos = pbroker -> dictcnt ++ ;
553
554
if (pbroker -> dictcnt ) {
554
555
pbroker -> dict = (enchant_dict * * )erealloc (pbroker -> dict , sizeof (enchant_dict * ) * pbroker -> dictcnt );
555
- pos = pbroker -> dictcnt ++ ;
556
556
} else {
557
557
pbroker -> dict = (enchant_dict * * )emalloc (sizeof (enchant_dict * ));
558
558
pos = 0 ;
559
- pbroker -> dictcnt ++ ;
560
559
}
561
560
562
561
dict = pbroker -> dict [pos ] = (enchant_dict * )emalloc (sizeof (enchant_dict ));
@@ -607,14 +606,14 @@ PHP_FUNCTION(enchant_broker_request_pwl_dict)
607
606
608
607
d = enchant_broker_request_pwl_dict (pbroker -> pbroker , (const char * )pwl );
609
608
if (d ) {
609
+ pos = pbroker -> dictcnt ++ ;
610
610
if (pbroker -> dictcnt ) {
611
- pos = pbroker -> dictcnt ++ ;
612
611
pbroker -> dict = (enchant_dict * * )erealloc (pbroker -> dict , sizeof (enchant_dict * ) * pbroker -> dictcnt );
613
612
} else {
614
613
pbroker -> dict = (enchant_dict * * )emalloc (sizeof (enchant_dict * ));
615
614
pos = 0 ;
616
- pbroker -> dictcnt ++ ;
617
615
}
616
+
618
617
dict = pbroker -> dict [pos ] = (enchant_dict * )emalloc (sizeof (enchant_dict ));
619
618
dict -> id = pos ;
620
619
dict -> pbroker = pbroker ;
You can’t perform that action at this time.
0 commit comments